All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] MIPS: BCM63XX: misc cleanup
@ 2012-01-31 14:08 Florian Fainelli
  2012-01-31 14:08 ` [PATCH 1/2] MIPS: BCM63XX: fix platform_devices id Florian Fainelli
  2012-01-31 14:08 ` [PATCH 2/2] MIPS: BCM63XX: be consistent in clock bits enable naming Florian Fainelli
  0 siblings, 2 replies; 4+ messages in thread
From: Florian Fainelli @ 2012-01-31 14:08 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips, Florian Fainelli

This patch set contains some small cleanups. This is the preliminary serie
of other changes.

Florian Fainelli (2):
  MIPS: BCM63XX: fix platform_devices id
  MIPS: BCM63XX: be consistent in clock bits enable naming

 arch/mips/bcm63xx/clk.c                           |    6 ++--
 arch/mips/bcm63xx/dev-dsp.c                       |    2 +-
 arch/mips/bcm63xx/dev-wdt.c                       |    2 +-
 arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h |   36 ++++++++++----------
 4 files changed, 23 insertions(+), 23 deletions(-)

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] MIPS: BCM63XX: fix platform_devices id
  2012-01-31 14:08 [PATCH 0/2] MIPS: BCM63XX: misc cleanup Florian Fainelli
@ 2012-01-31 14:08 ` Florian Fainelli
  2012-01-31 14:08 ` [PATCH 2/2] MIPS: BCM63XX: be consistent in clock bits enable naming Florian Fainelli
  1 sibling, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2012-01-31 14:08 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips, Florian Fainelli

There is only one watchdog and VoIP DSP platform devices per board, use
-1 as the platform_device id accordingly.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
 arch/mips/bcm63xx/dev-dsp.c |    2 +-
 arch/mips/bcm63xx/dev-wdt.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/bcm63xx/dev-dsp.c b/arch/mips/bcm63xx/dev-dsp.c
index da46d1d..5bb5b15 100644
--- a/arch/mips/bcm63xx/dev-dsp.c
+++ b/arch/mips/bcm63xx/dev-dsp.c
@@ -31,7 +31,7 @@ static struct resource voip_dsp_resources[] = {
 
 static struct platform_device bcm63xx_voip_dsp_device = {
 	.name		= "bcm63xx-voip-dsp",
-	.id		= 0,
+	.id		= -1,
 	.num_resources	= ARRAY_SIZE(voip_dsp_resources),
 	.resource	= voip_dsp_resources,
 };
diff --git a/arch/mips/bcm63xx/dev-wdt.c b/arch/mips/bcm63xx/dev-wdt.c
index 3e6c716..2a2346a 100644
--- a/arch/mips/bcm63xx/dev-wdt.c
+++ b/arch/mips/bcm63xx/dev-wdt.c
@@ -21,7 +21,7 @@ static struct resource wdt_resources[] = {
 
 static struct platform_device bcm63xx_wdt_device = {
 	.name		= "bcm63xx-wdt",
-	.id		= 0,
+	.id		= -1,
 	.num_resources	= ARRAY_SIZE(wdt_resources),
 	.resource	= wdt_resources,
 };
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] MIPS: BCM63XX: be consistent in clock bits enable naming
  2012-01-31 14:08 [PATCH 0/2] MIPS: BCM63XX: misc cleanup Florian Fainelli
  2012-01-31 14:08 ` [PATCH 1/2] MIPS: BCM63XX: fix platform_devices id Florian Fainelli
@ 2012-01-31 14:08 ` Florian Fainelli
  2012-06-05  9:55   ` Florian Fainelli
  1 sibling, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2012-01-31 14:08 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips, Florian Fainelli

Remove the _CLK suffix from the BCM6368 clock bits definitions to be
consistent with what is already present.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
 arch/mips/bcm63xx/clk.c                           |    6 ++--
 arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h |   36 ++++++++++----------
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
index 9d57c71..8d2ea22 100644
--- a/arch/mips/bcm63xx/clk.c
+++ b/arch/mips/bcm63xx/clk.c
@@ -120,7 +120,7 @@ static void enetsw_set(struct clk *clk, int enable)
 {
 	if (!BCMCPU_IS_6368())
 		return;
-	bcm_hwclock_set(CKCTL_6368_ROBOSW_CLK_EN |
+	bcm_hwclock_set(CKCTL_6368_ROBOSW_EN |
 			CKCTL_6368_SWPKT_USB_EN |
 			CKCTL_6368_SWPKT_SAR_EN, enable);
 	if (enable) {
@@ -163,7 +163,7 @@ static void usbh_set(struct clk *clk, int enable)
 	if (BCMCPU_IS_6348())
 		bcm_hwclock_set(CKCTL_6348_USBH_EN, enable);
 	else if (BCMCPU_IS_6368())
-		bcm_hwclock_set(CKCTL_6368_USBH_CLK_EN, enable);
+		bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
 }
 
 static struct clk clk_usbh = {
@@ -199,7 +199,7 @@ static void xtm_set(struct clk *clk, int enable)
 	if (!BCMCPU_IS_6368())
 		return;
 
-	bcm_hwclock_set(CKCTL_6368_SAR_CLK_EN |
+	bcm_hwclock_set(CKCTL_6368_SAR_EN |
 			CKCTL_6368_SWPKT_SAR_EN, enable);
 
 	if (enable) {
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
index 94d4faa..6ddd081 100644
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
@@ -90,29 +90,29 @@
 #define CKCTL_6368_PHYMIPS_EN		(1 << 6)
 #define CKCTL_6368_SWPKT_USB_EN		(1 << 7)
 #define CKCTL_6368_SWPKT_SAR_EN		(1 << 8)
-#define CKCTL_6368_SPI_CLK_EN		(1 << 9)
-#define CKCTL_6368_USBD_CLK_EN		(1 << 10)
-#define CKCTL_6368_SAR_CLK_EN		(1 << 11)
-#define CKCTL_6368_ROBOSW_CLK_EN	(1 << 12)
-#define CKCTL_6368_UTOPIA_CLK_EN	(1 << 13)
-#define CKCTL_6368_PCM_CLK_EN		(1 << 14)
-#define CKCTL_6368_USBH_CLK_EN		(1 << 15)
+#define CKCTL_6368_SPI_EN		(1 << 9)
+#define CKCTL_6368_USBD_EN		(1 << 10)
+#define CKCTL_6368_SAR_EN		(1 << 11)
+#define CKCTL_6368_ROBOSW_EN		(1 << 12)
+#define CKCTL_6368_UTOPIA_EN		(1 << 13)
+#define CKCTL_6368_PCM_EN		(1 << 14)
+#define CKCTL_6368_USBH_EN		(1 << 15)
 #define CKCTL_6368_DISABLE_GLESS_EN	(1 << 16)
-#define CKCTL_6368_NAND_CLK_EN		(1 << 17)
-#define CKCTL_6368_IPSEC_CLK_EN		(1 << 17)
+#define CKCTL_6368_NAND_EN		(1 << 17)
+#define CKCTL_6368_IPSEC_EN		(1 << 17)
 
 #define CKCTL_6368_ALL_SAFE_EN		(CKCTL_6368_SWPKT_USB_EN |	\
 					CKCTL_6368_SWPKT_SAR_EN |	\
-					CKCTL_6368_SPI_CLK_EN |		\
-					CKCTL_6368_USBD_CLK_EN |	\
-					CKCTL_6368_SAR_CLK_EN |		\
-					CKCTL_6368_ROBOSW_CLK_EN |	\
-					CKCTL_6368_UTOPIA_CLK_EN |	\
-					CKCTL_6368_PCM_CLK_EN |		\
-					CKCTL_6368_USBH_CLK_EN |	\
+					CKCTL_6368_SPI_EN |		\
+					CKCTL_6368_USBD_EN |		\
+					CKCTL_6368_SAR_EN |		\
+					CKCTL_6368_ROBOSW_EN |		\
+					CKCTL_6368_UTOPIA_EN |		\
+					CKCTL_6368_PCM_EN |		\
+					CKCTL_6368_USBH_EN |		\
 					CKCTL_6368_DISABLE_GLESS_EN |	\
-					CKCTL_6368_NAND_CLK_EN |	\
-					CKCTL_6368_IPSEC_CLK_EN)
+					CKCTL_6368_NAND_EN |		\
+					CKCTL_6368_IPSEC_EN)
 
 /* System PLL Control register  */
 #define PERF_SYS_PLL_CTL_REG		0x8
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] MIPS: BCM63XX: be consistent in clock bits enable naming
  2012-01-31 14:08 ` [PATCH 2/2] MIPS: BCM63XX: be consistent in clock bits enable naming Florian Fainelli
@ 2012-06-05  9:55   ` Florian Fainelli
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2012-06-05  9:55 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips

Hi Ralf,

On Tuesday 31 January 2012 15:08:08 Florian Fainelli wrote:
> Remove the _CLK suffix from the BCM6368 clock bits definitions to be
> consistent with what is already present.
> 
> Signed-off-by: Florian Fainelli <florian@openwrt.org>

This patch is a prerequisite for BCM63xx's SPI support, and should be applied 
to your master tree in order to fix the following build failure, the patch 
applies cleanly to your master tree.

arch/mips/bcm63xx/clk.c: In function 'spi_set':
arch/mips/bcm63xx/clk.c:188:10: error: 'CKCTL_6368_SPI_EN' undeclared (first 
use in this function)
arch/mips/bcm63xx/clk.c:188:10: note: each undeclared identifier is reported 
only once for each function it appears in
make[2]: *** [arch/mips/bcm63xx/clk.o] Error 1

Thanks!


> ---
>  arch/mips/bcm63xx/clk.c                           |    6 ++--
>  arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h |   36 
++++++++++----------
>  2 files changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
> index 9d57c71..8d2ea22 100644
> --- a/arch/mips/bcm63xx/clk.c
> +++ b/arch/mips/bcm63xx/clk.c
> @@ -120,7 +120,7 @@ static void enetsw_set(struct clk *clk, int enable)
>  {
>  	if (!BCMCPU_IS_6368())
>  		return;
> -	bcm_hwclock_set(CKCTL_6368_ROBOSW_CLK_EN |
> +	bcm_hwclock_set(CKCTL_6368_ROBOSW_EN |
>  			CKCTL_6368_SWPKT_USB_EN |
>  			CKCTL_6368_SWPKT_SAR_EN, enable);
>  	if (enable) {
> @@ -163,7 +163,7 @@ static void usbh_set(struct clk *clk, int enable)
>  	if (BCMCPU_IS_6348())
>  		bcm_hwclock_set(CKCTL_6348_USBH_EN, enable);
>  	else if (BCMCPU_IS_6368())
> -		bcm_hwclock_set(CKCTL_6368_USBH_CLK_EN, enable);
> +		bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
>  }
>  
>  static struct clk clk_usbh = {
> @@ -199,7 +199,7 @@ static void xtm_set(struct clk *clk, int enable)
>  	if (!BCMCPU_IS_6368())
>  		return;
>  
> -	bcm_hwclock_set(CKCTL_6368_SAR_CLK_EN |
> +	bcm_hwclock_set(CKCTL_6368_SAR_EN |
>  			CKCTL_6368_SWPKT_SAR_EN, enable);
>  
>  	if (enable) {
> diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h 
b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
> index 94d4faa..6ddd081 100644
> --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
> +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
> @@ -90,29 +90,29 @@
>  #define CKCTL_6368_PHYMIPS_EN		(1 << 6)
>  #define CKCTL_6368_SWPKT_USB_EN		(1 << 7)
>  #define CKCTL_6368_SWPKT_SAR_EN		(1 << 8)
> -#define CKCTL_6368_SPI_CLK_EN		(1 << 9)
> -#define CKCTL_6368_USBD_CLK_EN		(1 << 10)
> -#define CKCTL_6368_SAR_CLK_EN		(1 << 11)
> -#define CKCTL_6368_ROBOSW_CLK_EN	(1 << 12)
> -#define CKCTL_6368_UTOPIA_CLK_EN	(1 << 13)
> -#define CKCTL_6368_PCM_CLK_EN		(1 << 14)
> -#define CKCTL_6368_USBH_CLK_EN		(1 << 15)
> +#define CKCTL_6368_SPI_EN		(1 << 9)
> +#define CKCTL_6368_USBD_EN		(1 << 10)
> +#define CKCTL_6368_SAR_EN		(1 << 11)
> +#define CKCTL_6368_ROBOSW_EN		(1 << 12)
> +#define CKCTL_6368_UTOPIA_EN		(1 << 13)
> +#define CKCTL_6368_PCM_EN		(1 << 14)
> +#define CKCTL_6368_USBH_EN		(1 << 15)
>  #define CKCTL_6368_DISABLE_GLESS_EN	(1 << 16)
> -#define CKCTL_6368_NAND_CLK_EN		(1 << 17)
> -#define CKCTL_6368_IPSEC_CLK_EN		(1 << 17)
> +#define CKCTL_6368_NAND_EN		(1 << 17)
> +#define CKCTL_6368_IPSEC_EN		(1 << 17)
>  
>  #define CKCTL_6368_ALL_SAFE_EN		(CKCTL_6368_SWPKT_USB_EN |	\
>  					CKCTL_6368_SWPKT_SAR_EN |	\
> -					CKCTL_6368_SPI_CLK_EN |		\
> -					CKCTL_6368_USBD_CLK_EN |	\
> -					CKCTL_6368_SAR_CLK_EN |		\
> -					CKCTL_6368_ROBOSW_CLK_EN |	\
> -					CKCTL_6368_UTOPIA_CLK_EN |	\
> -					CKCTL_6368_PCM_CLK_EN |		\
> -					CKCTL_6368_USBH_CLK_EN |	\
> +					CKCTL_6368_SPI_EN |		\
> +					CKCTL_6368_USBD_EN |		\
> +					CKCTL_6368_SAR_EN |		\
> +					CKCTL_6368_ROBOSW_EN |		\
> +					CKCTL_6368_UTOPIA_EN |		\
> +					CKCTL_6368_PCM_EN |		\
> +					CKCTL_6368_USBH_EN |		\
>  					CKCTL_6368_DISABLE_GLESS_EN |	\
> -					CKCTL_6368_NAND_CLK_EN |	\
> -					CKCTL_6368_IPSEC_CLK_EN)
> +					CKCTL_6368_NAND_EN |		\
> +					CKCTL_6368_IPSEC_EN)
>  
>  /* System PLL Control register  */
>  #define PERF_SYS_PLL_CTL_REG		0x8
> -- 
> 1.7.5.4
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-05  9:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-31 14:08 [PATCH 0/2] MIPS: BCM63XX: misc cleanup Florian Fainelli
2012-01-31 14:08 ` [PATCH 1/2] MIPS: BCM63XX: fix platform_devices id Florian Fainelli
2012-01-31 14:08 ` [PATCH 2/2] MIPS: BCM63XX: be consistent in clock bits enable naming Florian Fainelli
2012-06-05  9:55   ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.