From 7e90d760ee14547145d7da01be4855ae7be5fe2c Mon Sep 17 00:00:00 2001 From: Dallas Foley Date: Thu, 16 Oct 2008 16:46:07 +0100 Subject: [ARM] S3C24XX: pwm-clock set_parent mask fix Fix s3c24xx pwm-clock supports use of the wrong clock when calculating the bitmask when configuring the parent clock from the set_parent call. Signed-off-by: Dallas Foley Signed-off-by: Ben Dooks --- arch/arm/plat-s3c24xx/pwm-clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/plat-s3c24xx/pwm-clock.c b/arch/arm/plat-s3c24xx/pwm-clock.c index 306cc9c6f9e..d41cccd6a25 100644 --- a/arch/arm/plat-s3c24xx/pwm-clock.c +++ b/arch/arm/plat-s3c24xx/pwm-clock.c @@ -315,7 +315,7 @@ static int clk_pwm_tin_set_parent(struct clk *clk, struct clk *parent) if (parent == s3c24xx_pwmclk_tclk(id)) bits = S3C2410_TCFG1_MUX_TCLK << shift; else if (parent == s3c24xx_pwmclk_tdiv(id)) - bits = clk_pwm_tdiv_bits(to_tdiv(clk)) << shift; + bits = clk_pwm_tdiv_bits(to_tdiv(parent)) << shift; else return -EINVAL; -- cgit v1.2.3 From 5fed4a3739c97eceeac011baf9b2194bda47123f Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Thu, 16 Oct 2008 16:46:08 +0100 Subject: [ARM] S3C24XX: Serial driver debug depends on DEBUG_LL The SERIAL_SAMSUNG_DEBUG used printascii() to avoid debugging through itself when selected as a console. Disable this option when DEBUG_LL is not set (printascii is unavailable). Signed-off-by: Ben Dooks --- drivers/serial/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index db783b77a88..c94d3c4b752 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -457,7 +457,7 @@ config SERIAL_SAMSUNG config SERIAL_SAMSUNG_DEBUG bool "Samsung SoC serial debug" - depends on SERIAL_SAMSUNG + depends on SERIAL_SAMSUNG && DEBUG_LL help Add support for debugging the serial driver. Since this is generally being used as a console, we use our own output -- cgit v1.2.3 From 5c37866c6e2f0d19896e4c14f386189c1fdf2295 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Thu, 16 Oct 2008 16:46:09 +0100 Subject: [ARM] S3C2443: Fix HCLK rate Fix the calculation of HCLK on the S3C2443, it should not have been passed through S3C2443_CLKDIV0_HALF_HCLK. Re-work of original patch from Wei Shuai Signed-off-by: Ben Dooks --- arch/arm/mach-s3c2443/clock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c index 603b5ea1dea..803e24cd29c 100644 --- a/arch/arm/mach-s3c2443/clock.c +++ b/arch/arm/mach-s3c2443/clock.c @@ -1033,8 +1033,7 @@ void __init s3c2443_init_clocks(int xtal) fclk = pll / s3c2443_fclk_div(clkdiv0); hclk = s3c2443_prediv_getrate(&clk_prediv); - hclk = hclk / s3c2443_get_hdiv(clkdiv0); - hclk = hclk / ((clkdiv0 & S3C2443_CLKDIV0_HALF_HCLK) ? 2 : 1); + hclk /= s3c2443_get_hdiv(clkdiv0); pclk = hclk / ((clkdiv0 & S3C2443_CLKDIV0_HALF_PCLK) ? 2 : 1); s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); -- cgit v1.2.3 From 55b404fd78792d7a88d19f2534510ee42841146f Mon Sep 17 00:00:00 2001 From: Nelson Castillo Date: Thu, 16 Oct 2008 16:46:10 +0100 Subject: [ARM] S3C24XX: Fix redefine of DEFINE_TIMER() in s3c24xx pwm-clock.c Do not redefine the DEFINE_TIMER macro. Renamed the local macro to DEFINE_S3C_TIMER. Signed-off-by: Nelson Castillo [ben-linux@fluff.org: spelling and subject fix] Signed-off-by: Ben Dooks --- arch/arm/plat-s3c24xx/pwm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/plat-s3c24xx/pwm.c b/arch/arm/plat-s3c24xx/pwm.c index 7a92c938542..cbc06067d9c 100644 --- a/arch/arm/plat-s3c24xx/pwm.c +++ b/arch/arm/plat-s3c24xx/pwm.c @@ -56,7 +56,7 @@ static struct clk *clk_scaler[2]; } \ } -#define DEFINE_TIMER(_tmr_no, _irq) \ +#define DEFINE_S3C_TIMER(_tmr_no, _irq) \ .name = "s3c24xx-pwm", \ .id = _tmr_no, \ .num_resources = TIMER_RESOURCE_SIZE, \ @@ -67,11 +67,11 @@ static struct clk *clk_scaler[2]; */ struct platform_device s3c_device_timer[] = { - [0] = { DEFINE_TIMER(0, IRQ_TIMER0) }, - [1] = { DEFINE_TIMER(1, IRQ_TIMER1) }, - [2] = { DEFINE_TIMER(2, IRQ_TIMER2) }, - [3] = { DEFINE_TIMER(3, IRQ_TIMER3) }, - [4] = { DEFINE_TIMER(4, IRQ_TIMER4) }, + [0] = { DEFINE_S3C_TIMER(0, IRQ_TIMER0) }, + [1] = { DEFINE_S3C_TIMER(1, IRQ_TIMER1) }, + [2] = { DEFINE_S3C_TIMER(2, IRQ_TIMER2) }, + [3] = { DEFINE_S3C_TIMER(3, IRQ_TIMER3) }, + [4] = { DEFINE_S3C_TIMER(4, IRQ_TIMER4) }, }; static inline int pwm_is_tdiv(struct pwm_device *pwm) -- cgit v1.2.3 From 35f53aafb60ebc3a26e5508e0e87bfc88c703654 Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 17 Oct 2008 13:19:08 +0100 Subject: [ARM] pxa: fix redefinition of NR_IRQS arch/arm/mach-pxa/include/mach/irqs.h:193:1: warning: "NR_IRQS" redefined arch/arm/mach-pxa/include/mach/irqs.h:263:1: warning: this is the location of the previous definition Signed-off-by: Russell King --- arch/arm/mach-pxa/include/mach/irqs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h index 9c163e19ada..32bb4a2eb7f 100644 --- a/arch/arm/mach-pxa/include/mach/irqs.h +++ b/arch/arm/mach-pxa/include/mach/irqs.h @@ -9,7 +9,8 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ - +#ifndef __ASM_MACH_IRQS_H +#define __ASM_MACH_IRQS_H #ifdef CONFIG_PXA_HAVE_ISA_IRQS #define PXA_ISA_IRQ(x) (x) @@ -264,3 +265,5 @@ #endif #endif /* CONFIG_PCI_HOST_ITE8152 */ + +#endif /* __ASM_MACH_IRQS_H */ -- cgit v1.2.3 From 957cf333b5284943c4866e1d0339a105d2762c9c Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 17 Oct 2008 13:39:26 +0100 Subject: [ARM] pxa: fix 3bca103a1e658d23737d20e1989139d9ca8973bf arch/arm/common/sa1111.c:593: error: implicit declaration of function 'dmabounce_register_dev' Signed-off-by: Russell King --- arch/arm/common/sa1111.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index fb86f248aab..6094c34d9ba 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -581,6 +581,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, goto out; } +#ifdef CONFIG_DMABOUNCE /* * If the parent device has a DMA mask associated with it, * propagate it down to the children. @@ -598,6 +599,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, } } } +#endif out: return ret; -- cgit v1.2.3 From e4d2a5985af957d2c0da61fb978d0c414b92a562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Grafstr=C3=B6m?= Date: Thu, 16 Oct 2008 17:37:24 +0100 Subject: [ARM] 5310/1: Fix cache flush functions for ARMv4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ARMv4 (ARM720T) cache flush functions are broken in 2.6.19+ kernels. The issue was introduced by commit f12d0d7c7786af39435ef6ae9defe47fb58f6091 This patch corrects the CPU_CP15 ifdef statements so that they actually do something. Signed-off-by: Anders Grafström Signed-off-by: Russell King --- arch/arm/mm/cache-v4.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/cache-v4.S b/arch/arm/mm/cache-v4.S index 33926c9fcda..5786adf1004 100644 --- a/arch/arm/mm/cache-v4.S +++ b/arch/arm/mm/cache-v4.S @@ -29,7 +29,7 @@ ENTRY(v4_flush_user_cache_all) * Clean and invalidate the entire cache. */ ENTRY(v4_flush_kern_cache_all) -#ifdef CPU_CP15 +#ifdef CONFIG_CPU_CP15 mov r0, #0 mcr p15, 0, r0, c7, c7, 0 @ flush ID cache mov pc, lr @@ -48,7 +48,7 @@ ENTRY(v4_flush_kern_cache_all) * - flags - vma_area_struct flags describing address space */ ENTRY(v4_flush_user_cache_range) -#ifdef CPU_CP15 +#ifdef CONFIG_CPU_CP15 mov ip, #0 mcreq p15, 0, ip, c7, c7, 0 @ flush ID cache mov pc, lr @@ -116,7 +116,7 @@ ENTRY(v4_dma_inv_range) * - end - virtual end address */ ENTRY(v4_dma_flush_range) -#ifdef CPU_CP15 +#ifdef CONFIG_CPU_CP15 mov r0, #0 mcr p15, 0, r0, c7, c7, 0 @ flush ID cache #endif -- cgit v1.2.3 From 71a35d75661271d20ff0098817070f6545e90cbe Mon Sep 17 00:00:00 2001 From: roelkluin Date: Tue, 14 Oct 2008 21:28:51 +0100 Subject: [ARM] 5303/1: period_cycles should be greater than 1 If period_cycles is 0, prescale becomes silly. Signed-off-by: Roel Kluin Signed-off-by: Russell King --- arch/arm/mach-pxa/pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-pxa/pwm.c b/arch/arm/mach-pxa/pwm.c index 316cd986da5..74e2ead8cee 100644 --- a/arch/arm/mach-pxa/pwm.c +++ b/arch/arm/mach-pxa/pwm.c @@ -60,7 +60,7 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) do_div(c, 1000000000); period_cycles = c; - if (period_cycles < 0) + if (period_cycles < 1) period_cycles = 1; prescale = (period_cycles - 1) / 1024; pv = period_cycles / (prescale + 1) - 1; -- cgit v1.2.3 From 485bdde78747f7ce2af164406c32db23e4688925 Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 17 Oct 2008 14:00:43 +0100 Subject: [ARM] dmabounce requires ZONE_DMA Rather than having everything that needs DMABOUNCE also select ZONE_DMA, arrange for DMABOUNCE to select it instead. This is far more sensible. Signed-off-by: Russell King --- arch/arm/Kconfig | 2 +- arch/arm/common/Kconfig | 2 +- arch/arm/mach-ixp4xx/Kconfig | 5 ----- arch/arm/mach-pxa/Kconfig | 1 - 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 4853f9df37b..6c73e963d97 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -354,7 +354,7 @@ config ARCH_IXP4XX select GENERIC_GPIO select GENERIC_TIME select GENERIC_CLOCKEVENTS - select ZONE_DMA if PCI + select DMABOUNCE if PCI help Support for Intel's IXP4XX (XScale) family of processors. diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig index 2e32acca02f..86b5e698266 100644 --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig @@ -13,10 +13,10 @@ config ICST307 config SA1111 bool select DMABOUNCE if !ARCH_PXA - select ZONE_DMA if !ARCH_PXA config DMABOUNCE bool + select ZONE_DMA config TIMER_ACORN bool diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig index db8b5fe06c0..2c5a02b8520 100644 --- a/arch/arm/mach-ixp4xx/Kconfig +++ b/arch/arm/mach-ixp4xx/Kconfig @@ -167,11 +167,6 @@ config MACH_GTWX5715 comment "IXP4xx Options" -config DMABOUNCE - bool - default y - depends on PCI - config IXP4XX_INDIRECT_PCI bool "Use indirect PCI memory access" depends on PCI diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index f27f6b3d6e6..f781873431f 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig @@ -257,7 +257,6 @@ config MACH_ARMCORE bool "CompuLab CM-X255/CM-X270 modules" select PXA27x select IWMMXT - select ZONE_DMA if PCI select PXA25x select PXA_SSP -- cgit v1.2.3 From 3be8c477d7f03c75dbd7911aa93cc6afa57fd168 Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 17 Oct 2008 15:08:14 +0100 Subject: [ARM] pxa: fix trizeps defconfig Signed-off-by: Russell King --- arch/arm/configs/trizeps4_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/trizeps4_defconfig b/arch/arm/configs/trizeps4_defconfig index 8b7a431a8bf..9033d147f05 100644 --- a/arch/arm/configs/trizeps4_defconfig +++ b/arch/arm/configs/trizeps4_defconfig @@ -147,6 +147,7 @@ CONFIG_ARCH_PXA=y # CONFIG_MACH_MAINSTONE is not set # CONFIG_ARCH_PXA_IDP is not set # CONFIG_PXA_SHARPSL is not set +CONFIG_TRIZEPS_PXA=y CONFIG_MACH_TRIZEPS4=y CONFIG_MACH_TRIZEPS4_CONXS=y # CONFIG_MACH_TRIZEPS4_ANY is not set -- cgit v1.2.3 From c97ce774b75b3e9ea32429ba57377b304227ae2c Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 17 Oct 2008 15:23:52 +0100 Subject: [ARM] pxa: fix trizeps PCMCIA build Signed-off-by: Russell King --- drivers/pcmcia/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index b46c60b7270..23e492bf75c 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -70,7 +70,7 @@ pxa2xx-obj-$(CONFIG_MACH_MAINSTONE) += pxa2xx_mainstone.o pxa2xx-obj-$(CONFIG_PXA_SHARPSL) += pxa2xx_sharpsl.o pxa2xx-obj-$(CONFIG_MACH_ARMCORE) += pxa2xx_cm_x2xx_cs.o pxa2xx-obj-$(CONFIG_ARCH_VIPER) += pxa2xx_viper.o -pxa2xx-obj-$(CONFIG_TRIZEPS_PCMCIA) += pxa2xx_trizeps.o +pxa2xx-obj-$(CONFIG_TRIZEPS_PCMCIA) += pxa2xx_trizeps4.o pxa2xx-obj-$(CONFIG_MACH_PALMTX) += pxa2xx_palmtx.o pxa2xx-obj-$(CONFIG_MACH_PALMLD) += pxa2xx_palmld.o -- cgit v1.2.3 From 74ca1ec2ce62cd31952703c6e36911b23d70623c Mon Sep 17 00:00:00 2001 From: Mariusz Kozlowski Date: Sat, 18 Oct 2008 14:56:43 +0200 Subject: [ARM] balance parenthesis in header file Hello, Introduced by: commit fff147208b48680cb7b627a144113a6585828a0e Author: Eric Miao Date: Fri Sep 5 22:15:23 2008 +0800 Signed-off-by: Mariusz Kozlowski Signed-off-by: Russell King --- arch/arm/mach-pxa/include/mach/spitz.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-pxa/include/mach/spitz.h b/arch/arm/mach-pxa/include/mach/spitz.h index 31ac26b55bc..e8488dfb7e9 100644 --- a/arch/arm/mach-pxa/include/mach/spitz.h +++ b/arch/arm/mach-pxa/include/mach/spitz.h @@ -142,7 +142,7 @@ #define SPITZ_SCP2_GPIO_BASE (NR_BUILTIN_GPIO + 12) #define SPITZ_GPIO_IR_ON (SPITZ_SCP2_GPIO_BASE + 0) -#define SPITZ_GPIO_AKIN_PULLUP (SPITZ_SCP2_GPIO_BASE + 1 +#define SPITZ_GPIO_AKIN_PULLUP (SPITZ_SCP2_GPIO_BASE + 1) #define SPITZ_GPIO_RESERVED_1 (SPITZ_SCP2_GPIO_BASE + 2) #define SPITZ_GPIO_RESERVED_2 (SPITZ_SCP2_GPIO_BASE + 3) #define SPITZ_GPIO_RESERVED_3 (SPITZ_SCP2_GPIO_BASE + 4) -- cgit v1.2.3 From 778c4c821779bb7eef7f5a1eea4d15d05d976f8b Mon Sep 17 00:00:00 2001 From: Mariusz Kozlowski Date: Sat, 18 Oct 2008 15:15:16 +0200 Subject: [ARM] remove extra brace in arch/arm/mach-pxa/trizeps4.c Hello, Introduced by: commit 642aa6637e46ae788f1f8916dc9aa5a68917e12e Author: Jrgen Schindele Date: Mon Aug 18 21:45:03 2008 +0100 Signed-off-by: Mariusz Kozlowski Signed-off-by: Russell King --- arch/arm/mach-pxa/trizeps4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index a13dbf3c2c0..a72e3add743 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c @@ -399,7 +399,7 @@ static void trizeps4_irda_transceiver_mode(struct device *dev, int mode) /* Switch mode */ if (mode & IR_SIRMODE) trizeps_conxs_ircr &= ~ConXS_IRCR_MODE; /* Slow mode */ - else if (mode & IR_FIRMODE) { + else if (mode & IR_FIRMODE) trizeps_conxs_ircr |= ConXS_IRCR_MODE; /* Fast mode */ /* Switch power */ -- cgit v1.2.3 From 04185fc67c0f8ec84ce9dd9ef33c9825b41453c6 Mon Sep 17 00:00:00 2001 From: Lennert Buytenhek Date: Wed, 8 Oct 2008 23:41:19 +0200 Subject: [ARM] mv78xx0: force link speed/duplex on eth2/eth3 On the mv78xx0 development board, eth2 and eth3 do not have corresponding PHYs, but are internally connected, as a way of facilitating communication between the two CPU cores. Since there are no PHYs, we need to tell the network driver explicitly to force the link on eth2 and eth3 up, to 1000 Mb/s full duplex. Signed-off-by: Lennert Buytenhek Signed-off-by: Nicolas Pitre --- arch/arm/mach-mv78xx0/db78x00-bp-setup.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c index 49f434c39eb..2e285bbb7bb 100644 --- a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c +++ b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -28,10 +29,14 @@ static struct mv643xx_eth_platform_data db78x00_ge01_data = { static struct mv643xx_eth_platform_data db78x00_ge10_data = { .phy_addr = MV643XX_ETH_PHY_NONE, + .speed = SPEED_1000, + .duplex = DUPLEX_FULL, }; static struct mv643xx_eth_platform_data db78x00_ge11_data = { .phy_addr = MV643XX_ETH_PHY_NONE, + .speed = SPEED_1000, + .duplex = DUPLEX_FULL, }; static struct mv_sata_platform_data db78x00_sata_data = { -- cgit v1.2.3 From dcf1cece143d95b48676cf607a21ee0805daa55a Mon Sep 17 00:00:00 2001 From: Lennert Buytenhek Date: Thu, 25 Sep 2008 16:23:48 +0200 Subject: [ARM] Orion: instantiate the dsa switch driver This adds DSA switch instantiation hooks to the orion5x and the kirkwood ARM SoC platform code, and instantiates the DSA switch driver on the 88F5181L FXO RD, the 88F5181L GE RD, the 6183 AP GE RD, the Linksys WRT350n v2, and the 88F6281 RD boards. Signed-off-by: Lennert Buytenhek Tested-by: Nicolas Pitre Tested-by: Peter van Valderen Tested-by: Dirk Teurlings Signed-off-by: Nicolas Pitre --- arch/arm/mach-kirkwood/common.c | 35 ++++++++++++++++++++++++++++ arch/arm/mach-kirkwood/common.h | 2 ++ arch/arm/mach-kirkwood/rd88f6281-setup.c | 11 +++++++++ arch/arm/mach-orion5x/common.c | 35 ++++++++++++++++++++++++++++ arch/arm/mach-orion5x/common.h | 2 ++ arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 11 +++++++++ arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | 11 +++++++++ arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 11 +++++++++ arch/arm/mach-orion5x/wrt350n-v2-setup.c | 11 +++++++++ 9 files changed, 129 insertions(+) diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 85cad05d8c5..0bb1fbd84cc 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -151,6 +152,40 @@ void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data) } +/***************************************************************************** + * Ethernet switch + ****************************************************************************/ +static struct resource kirkwood_switch_resources[] = { + { + .start = 0, + .end = 0, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device kirkwood_switch_device = { + .name = "dsa", + .id = 0, + .num_resources = 0, + .resource = kirkwood_switch_resources, +}; + +void __init kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq) +{ + if (irq != NO_IRQ) { + kirkwood_switch_resources[0].start = irq; + kirkwood_switch_resources[0].end = irq; + kirkwood_switch_device.num_resources = 1; + } + + d->mii_bus = &kirkwood_ge00_shared.dev; + d->netdev = &kirkwood_ge00.dev; + kirkwood_switch_device.dev.platform_data = d; + + platform_device_register(&kirkwood_switch_device); +} + + /***************************************************************************** * SoC RTC ****************************************************************************/ diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 8fa0f6a2763..5774632a67e 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h @@ -11,6 +11,7 @@ #ifndef __ARCH_KIRKWOOD_COMMON_H #define __ARCH_KIRKWOOD_COMMON_H +struct dsa_platform_data; struct mv643xx_eth_platform_data; struct mv_sata_platform_data; @@ -29,6 +30,7 @@ void kirkwood_pcie_id(u32 *dev, u32 *rev); void kirkwood_ehci_init(void); void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data); +void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq); void kirkwood_pcie_init(void); void kirkwood_rtc_init(void); void kirkwood_sata_init(struct mv_sata_platform_data *sata_data); diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c index f785093e433..175054abd63 100644 --- a/arch/arm/mach-kirkwood/rd88f6281-setup.c +++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -74,6 +75,15 @@ static struct mv643xx_eth_platform_data rd88f6281_ge00_data = { .duplex = DUPLEX_FULL, }; +static struct dsa_platform_data rd88f6281_switch_data = { + .port_names[0] = "lan1", + .port_names[1] = "lan2", + .port_names[2] = "lan3", + .port_names[3] = "lan4", + .port_names[4] = "wan", + .port_names[5] = "cpu", +}; + static struct mv_sata_platform_data rd88f6281_sata_data = { .n_ports = 2, }; @@ -87,6 +97,7 @@ static void __init rd88f6281_init(void) kirkwood_ehci_init(); kirkwood_ge00_init(&rd88f6281_ge00_data); + kirkwood_ge00_switch_init(&rd88f6281_switch_data, NO_IRQ); kirkwood_rtc_init(); kirkwood_sata_init(&rd88f6281_sata_data); kirkwood_uart0_init(); diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 9625ef5975d..a2f917e0a30 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -197,6 +198,40 @@ void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) } +/***************************************************************************** + * Ethernet switch + ****************************************************************************/ +static struct resource orion5x_switch_resources[] = { + { + .start = 0, + .end = 0, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device orion5x_switch_device = { + .name = "dsa", + .id = 0, + .num_resources = 0, + .resource = orion5x_switch_resources, +}; + +void __init orion5x_eth_switch_init(struct dsa_platform_data *d, int irq) +{ + if (irq != NO_IRQ) { + orion5x_switch_resources[0].start = irq; + orion5x_switch_resources[0].end = irq; + orion5x_switch_device.num_resources = 1; + } + + d->mii_bus = &orion5x_eth_shared.dev; + d->netdev = &orion5x_eth.dev; + orion5x_switch_device.dev.platform_data = d; + + platform_device_register(&orion5x_switch_device); +} + + /***************************************************************************** * I2C ****************************************************************************/ diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index 1f8b2da676a..a000c7c6ee9 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h @@ -1,6 +1,7 @@ #ifndef __ARCH_ORION5X_COMMON_H #define __ARCH_ORION5X_COMMON_H +struct dsa_platform_data; struct mv643xx_eth_platform_data; struct mv_sata_platform_data; @@ -29,6 +30,7 @@ void orion5x_setup_pcie_wa_win(u32 base, u32 size); void orion5x_ehci0_init(void); void orion5x_ehci1_init(void); void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data); +void orion5x_eth_switch_init(struct dsa_platform_data *d, int irq); void orion5x_i2c_init(void); void orion5x_sata_init(struct mv_sata_platform_data *sata_data); void orion5x_spi_init(void); diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index 500cdadaf09..15f53235ee3 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -93,6 +94,15 @@ static struct mv643xx_eth_platform_data rd88f5181l_fxo_eth_data = { .duplex = DUPLEX_FULL, }; +static struct dsa_platform_data rd88f5181l_fxo_switch_data = { + .port_names[0] = "lan2", + .port_names[1] = "lan1", + .port_names[2] = "wan", + .port_names[3] = "cpu", + .port_names[5] = "lan4", + .port_names[7] = "lan3", +}; + static void __init rd88f5181l_fxo_init(void) { /* @@ -107,6 +117,7 @@ static void __init rd88f5181l_fxo_init(void) */ orion5x_ehci0_init(); orion5x_eth_init(&rd88f5181l_fxo_eth_data); + orion5x_eth_switch_init(&rd88f5181l_fxo_switch_data, NO_IRQ); orion5x_uart0_init(); orion5x_setup_dev_boot_win(RD88F5181L_FXO_NOR_BOOT_BASE, diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index ebde8141649..8ad3934399d 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -94,6 +95,15 @@ static struct mv643xx_eth_platform_data rd88f5181l_ge_eth_data = { .duplex = DUPLEX_FULL, }; +static struct dsa_platform_data rd88f5181l_ge_switch_data = { + .port_names[0] = "lan2", + .port_names[1] = "lan1", + .port_names[2] = "wan", + .port_names[3] = "cpu", + .port_names[5] = "lan4", + .port_names[7] = "lan3", +}; + static struct i2c_board_info __initdata rd88f5181l_ge_i2c_rtc = { I2C_BOARD_INFO("ds1338", 0x68), }; @@ -112,6 +122,7 @@ static void __init rd88f5181l_ge_init(void) */ orion5x_ehci0_init(); orion5x_eth_init(&rd88f5181l_ge_eth_data); + orion5x_eth_switch_init(&rd88f5181l_ge_switch_data, gpio_to_irq(8)); orion5x_i2c_init(); orion5x_uart0_init(); diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c index 40e04953909..262e25e4dac 100644 --- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -34,6 +35,15 @@ static struct mv643xx_eth_platform_data rd88f6183ap_ge_eth_data = { .duplex = DUPLEX_FULL, }; +static struct dsa_platform_data rd88f6183ap_ge_switch_data = { + .port_names[0] = "lan1", + .port_names[1] = "lan2", + .port_names[2] = "lan3", + .port_names[3] = "lan4", + .port_names[4] = "wan", + .port_names[5] = "cpu", +}; + static struct mtd_partition rd88f6183ap_ge_partitions[] = { { .name = "kernel", @@ -79,6 +89,7 @@ static void __init rd88f6183ap_ge_init(void) */ orion5x_ehci0_init(); orion5x_eth_init(&rd88f6183ap_ge_eth_data); + orion5x_eth_switch_init(&rd88f6183ap_ge_switch_data, gpio_to_irq(3)); spi_register_board_info(rd88f6183ap_ge_spi_slave_info, ARRAY_SIZE(rd88f6183ap_ge_spi_slave_info)); orion5x_spi_init(); diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index 9a4fd525646..cc8f8920086 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -105,6 +106,15 @@ static struct mv643xx_eth_platform_data wrt350n_v2_eth_data = { .duplex = DUPLEX_FULL, }; +static struct dsa_platform_data wrt350n_v2_switch_data = { + .port_names[0] = "lan2", + .port_names[1] = "lan1", + .port_names[2] = "wan", + .port_names[3] = "cpu", + .port_names[5] = "lan3", + .port_names[7] = "lan4", +}; + static void __init wrt350n_v2_init(void) { /* @@ -119,6 +129,7 @@ static void __init wrt350n_v2_init(void) */ orion5x_ehci0_init(); orion5x_eth_init(&wrt350n_v2_eth_data); + orion5x_eth_switch_init(&wrt350n_v2_switch_data, NO_IRQ); orion5x_uart0_init(); orion5x_setup_dev_boot_win(WRT350N_V2_NOR_BOOT_BASE, -- cgit v1.2.3 From c0e1936338a11ea252d11370ff62e40db334f646 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Sun, 19 Oct 2008 14:18:25 -0400 Subject: [ARM] Orion: activate workaround for 88f6183 SPI clock erratum Commit 2ede90ca78500ca0ffeee19d7812d345f8ad152d adds 6183 support, but the SPI support in there doesn't work since it depends on a 6183 SPI unit erratum fix that only just went upstream, via commit 2bec19feabd53cba75e9dab0e79afbe868a37113. Signed-off-by: Nicolas Pitre --- arch/arm/mach-orion5x/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index a2f917e0a30..437065c25c9 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c @@ -310,7 +310,8 @@ void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data) * SPI ****************************************************************************/ static struct orion_spi_info orion5x_spi_plat_data = { - .tclk = 0, + .tclk = 0, + .enable_clock_fix = 1, }; static struct resource orion5x_spi_resources[] = { -- cgit v1.2.3 From 5d43839ab9988f236cdda1ed073d6916857bc3c5 Mon Sep 17 00:00:00 2001 From: Kristoffer Ericson Date: Tue, 21 Oct 2008 19:47:22 +0100 Subject: [ARM] 5315/1: Fix section mismatch warning (sa1111) This patch fixes the section mismatch warning from sa1111.o at buildtime. CC arch/arm/common/sa1111.o LD arch/arm/common/built-in.o LD vmlinux.o MODPOST vmlinux.o WARNING: vmlinux.o(.text+0x87f4): Section mismatch in reference from the function sa1111_probe() to the function .devinit.text:sa1110_mb_enable() The function sa1111_probe() references the function __devinit sa1110_mb_enable(). This is often because sa1111_probe lacks a __devinit annotation or the annotation of sa1110_mb_enable is wrong. Signed-off-by: Kristoffer Ericson Signed-off-by: Russell King --- arch/arm/common/sa1111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 6094c34d9ba..47ccec95f3e 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -939,7 +939,7 @@ static int sa1111_resume(struct platform_device *dev) #define sa1111_resume NULL #endif -static int sa1111_probe(struct platform_device *pdev) +static int __devinit sa1111_probe(struct platform_device *pdev) { struct resource *mem; int irq; -- cgit v1.2.3 From f6335c43f3d7816ba2e69abce4f29c41f65bb27e Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 21 Oct 2008 23:29:56 +0100 Subject: [ARM] clps711x: add sparsemem definitions Fix the edb7211_defconfig build errors. Signed-off-by: Russell King --- arch/arm/mach-clps711x/include/mach/memory.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-clps711x/include/mach/memory.h b/arch/arm/mach-clps711x/include/mach/memory.h index 71c2fa70c8e..98ec30c97bb 100644 --- a/arch/arm/mach-clps711x/include/mach/memory.h +++ b/arch/arm/mach-clps711x/include/mach/memory.h @@ -89,6 +89,8 @@ * node 3: 0xd8000000 - 0xdfffffff */ #define NODE_MEM_SIZE_BITS 24 +#define SECTION_SIZE_BITS 24 +#define MAX_PHYSMEM_BITS 32 #endif -- cgit v1.2.3