From c11b6a420b092a576e003bbb520392268338d97b Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Mon, 4 Jan 2010 17:00:13 +0800 Subject: [ARM] pxa: add the missing AC97 pin configurations Missing AC97 pin configurations are added where pxa_set_ac97_info() are called for all pxa25x/pxa27x platforms. Where no exact configuration is provided, use the default as in sound/arm/pxa2xx-ac97-lib.c Cc: Dmitry Eremin-Solenikov Signed-off-by: Eric Miao --- arch/arm/mach-pxa/zeus.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm/mach-pxa/zeus.c') diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 75f2a37f945d..9c2ec776f601 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -706,6 +706,12 @@ static struct i2c_board_info __initdata zeus_i2c_devices[] = { }; static mfp_cfg_t zeus_pin_config[] __initdata = { + /* AC97 */ + GPIO28_AC97_BITCLK, + GPIO29_AC97_SDATA_IN_0, + GPIO30_AC97_SDATA_OUT, + GPIO31_AC97_SYNC, + GPIO15_nCS_1, GPIO78_nCS_2, GPIO80_nCS_4, -- cgit From 98acdbe4cf83f5a2e21c7aac830146b5d6da9282 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 16 Feb 2010 22:42:55 +0100 Subject: [ARM] pxa: define zeus_power_off() only when CONFIG_PM enabled Add some safety check for CONFIG_PM around zeus_power_off(). Without it linking can fail like this: arch/arm/mach-pxa/built-in.o: In function `zeus_power_off': e800.c:(.text+0x2bc8): undefined reference to `pxa27x_cpu_suspend' Signed-off-by: Stefan Schmidt Acked-by: Marc Zyngier Signed-off-by: Eric Miao --- arch/arm/mach-pxa/zeus.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm/mach-pxa/zeus.c') diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 9c2ec776f601..765e6189f7ba 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -621,11 +621,15 @@ static struct pxa2xx_udc_mach_info zeus_udc_info = { .udc_command = zeus_udc_command, }; +#ifdef CONFIG_PM static void zeus_power_off(void) { local_irq_disable(); pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP); } +#else +#define zeus_power_off NULL +#endif #ifdef CONFIG_APM_EMULATION static void zeus_get_power_status(struct apm_power_info *info) -- cgit From 7ff27dfa6e484ff5d901ec075a623c06c46d7a0f Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Thu, 18 Feb 2010 20:29:24 +0000 Subject: [ARM] pxa/zeus: Correct the USB host initialisation flags Signed-off-by: Amit Walambe Signed-off-by: Marc Zyngier Signed-off-by: Eric Miao --- arch/arm/mach-pxa/zeus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-pxa/zeus.c') diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 765e6189f7ba..1a73dc8f4e41 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -509,7 +509,9 @@ static void zeus_ohci_exit(struct device *dev) static struct pxaohci_platform_data zeus_ohci_platform_data = { .port_mode = PMM_NPS_MODE, - .flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW, + /* Clear Power Control Polarity Low and set Power Sense + * Polarity Low. Supply power to USB ports. */ + .flags = ENABLE_PORT_ALL | POWER_SENSE_LOW, .init = zeus_ohci_init, .exit = zeus_ohci_exit, }; -- cgit From 90ac0dfd9f5931c9011b35ced0ba576e32656fb2 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Thu, 18 Feb 2010 20:30:31 +0000 Subject: [ARM] pxa/zeus: Add Eurotech as the manufacturer Signed-off-by: Amit Walambe Signed-off-by: Marc Zyngier Signed-off-by: Eric Miao --- arch/arm/mach-pxa/zeus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-pxa/zeus.c') diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 1a73dc8f4e41..82070e376617 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -849,7 +849,7 @@ static void __init zeus_map_io(void) PCFR = PCFR_OPDE | PCFR_DC_EN | PCFR_FS | PCFR_FP; } -MACHINE_START(ARCOM_ZEUS, "Arcom ZEUS") +MACHINE_START(ARCOM_ZEUS, "Arcom/Eurotech ZEUS") /* Maintainer: Marc Zyngier */ .phys_io = 0x40000000, .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc), -- cgit From fcfdc67ff2b104355683f7264a6559a0cc360646 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Thu, 18 Feb 2010 20:31:43 +0000 Subject: [ARM] pxa/zeus: Add support for onboard max6369 watchdog Signed-off-by: Marc Zyngier Signed-off-by: Eric Miao --- arch/arm/mach-pxa/zeus.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'arch/arm/mach-pxa/zeus.c') diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 82070e376617..9ba8fccd98ff 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -457,6 +457,19 @@ static struct platform_device zeus_pcmcia_device = { }, }; +static struct resource zeus_max6369_resource = { + .start = ZEUS_CPLD_EXTWDOG_PHYS, + .end = ZEUS_CPLD_EXTWDOG_PHYS, + .flags = IORESOURCE_MEM, +}; + +struct platform_device zeus_max6369_device = { + .name = "max6369_wdt", + .id = -1, + .resource = &zeus_max6369_resource, + .num_resources = 1, +}; + static struct platform_device *zeus_devices[] __initdata = { &zeus_serial_device, &zeus_mtd_devices[0], @@ -466,6 +479,7 @@ static struct platform_device *zeus_devices[] __initdata = { &pxa2xx_spi_ssp3_device, &zeus_leds_device, &zeus_pcmcia_device, + &zeus_max6369_device, }; /* AC'97 */ @@ -818,12 +832,6 @@ static struct map_desc zeus_io_desc[] __initdata = { .length = 0x1000, .type = MT_DEVICE, }, - { - .virtual = ZEUS_CPLD_EXTWDOG, - .pfn = __phys_to_pfn(ZEUS_CPLD_EXTWDOG_PHYS), - .length = 0x1000, - .type = MT_DEVICE, - }, { .virtual = ZEUS_PC104IO, .pfn = __phys_to_pfn(ZEUS_PC104IO_PHYS), -- cgit From 438a22fe26c3fdeb422d92072523d5b35d849dc3 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Thu, 18 Feb 2010 20:33:02 +0000 Subject: [ARM] pxa/zeus: Add support for mcp2515 CAN bus Signed-off-by: Marc Zyngier Signed-off-by: Eric Miao --- arch/arm/mach-pxa/zeus.c | 55 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 6 deletions(-) (limited to 'arch/arm/mach-pxa/zeus.c') diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 9ba8fccd98ff..39896d883584 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -387,11 +388,47 @@ static struct pxa2xx_spi_master pxa2xx_spi_ssp3_master_info = { .enable_dma = 1, }; -static struct platform_device pxa2xx_spi_ssp3_device = { - .name = "pxa2xx-spi", - .id = 3, - .dev = { - .platform_data = &pxa2xx_spi_ssp3_master_info, +/* CAN bus on SPI */ +static int zeus_mcp2515_setup(struct spi_device *sdev) +{ + int err; + + err = gpio_request(ZEUS_CAN_SHDN_GPIO, "CAN shutdown"); + if (err) + return err; + + err = gpio_direction_output(ZEUS_CAN_SHDN_GPIO, 1); + if (err) { + gpio_free(ZEUS_CAN_SHDN_GPIO); + return err; + } + + return 0; +} + +static int zeus_mcp2515_transceiver_enable(int enable) +{ + gpio_set_value(ZEUS_CAN_SHDN_GPIO, !enable); + return 0; +} + +static struct mcp251x_platform_data zeus_mcp2515_pdata = { + .oscillator_frequency = 16*1000*1000, + .model = CAN_MCP251X_MCP2515, + .board_specific_setup = zeus_mcp2515_setup, + .transceiver_enable = zeus_mcp2515_transceiver_enable, + .power_enable = zeus_mcp2515_transceiver_enable, +}; + +static struct spi_board_info zeus_spi_board_info[] = { + [0] = { + .modalias = "mcp251x", + .platform_data = &zeus_mcp2515_pdata, + .irq = gpio_to_irq(ZEUS_CAN_GPIO), + .max_speed_hz = 1*1000*1000, + .bus_num = 3, + .mode = SPI_MODE_0, + .chip_select = 0, }, }; @@ -476,7 +513,6 @@ static struct platform_device *zeus_devices[] __initdata = { &zeus_dm9k0_device, &zeus_dm9k1_device, &zeus_sram_device, - &pxa2xx_spi_ssp3_device, &zeus_leds_device, &zeus_pcmcia_device, &zeus_max6369_device, @@ -757,6 +793,11 @@ static mfp_cfg_t zeus_pin_config[] __initdata = { GPIO104_CIF_DD_2, GPIO105_CIF_DD_1, + GPIO81_SSP3_TXD, + GPIO82_SSP3_RXD, + GPIO83_SSP3_SFRM, + GPIO84_SSP3_SCLK, + GPIO48_nPOE, GPIO49_nPWE, GPIO50_nPIOR, @@ -811,6 +852,8 @@ static void __init zeus_init(void) pxa_set_ac97_info(&zeus_ac97_info); pxa_set_i2c_info(NULL); i2c_register_board_info(0, ARRAY_AND_SIZE(zeus_i2c_devices)); + pxa2xx_set_spi_info(3, &pxa2xx_spi_ssp3_master_info); + spi_register_board_info(zeus_spi_board_info, ARRAY_SIZE(zeus_spi_board_info)); } static struct map_desc zeus_io_desc[] __initdata = { -- cgit