diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-08-29 00:55:06 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2008-09-25 16:26:44 -0400 |
commit | d323ade13b959dfcf14bf18902b600c5cc711dea (patch) | |
tree | 44a83db447688b3fc9d4fe768b321c392b3aad66 /arch/arm/mach-orion5x/common.c | |
parent | 104ea0781a7052e03d731e2ff3df8bde66036bad (diff) |
[ARM] Orion: add 88F6183 (Orion-1-90) support
The Orion-1-90 (88F6183) is another member of the Orion SoC family,
which has a 16 bit DDR2 interface, one x1 PCIe port (configurable as
Root Complex or Endpoint), one 10/100/1000 ethernet interface, one
USB 2.0 port with PHY, one SPDIF/I2S interface, one SDIO interface,
one TWSI interface, two UARTs, one SPI interface, a NAND controller,
a crypto engine, and a 4-channel DMA engine.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/arm/mach-orion5x/common.c')
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 8a8b089b8b74..9625ef5975d0 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/mv643xx_eth.h> | 18 | #include <linux/mv643xx_eth.h> |
19 | #include <linux/mv643xx_i2c.h> | 19 | #include <linux/mv643xx_i2c.h> |
20 | #include <linux/ata_platform.h> | 20 | #include <linux/ata_platform.h> |
21 | #include <linux/spi/orion_spi.h> | ||
21 | #include <asm/page.h> | 22 | #include <asm/page.h> |
22 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
23 | #include <asm/timex.h> | 24 | #include <asm/timex.h> |
@@ -271,6 +272,38 @@ void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data) | |||
271 | 272 | ||
272 | 273 | ||
273 | /***************************************************************************** | 274 | /***************************************************************************** |
275 | * SPI | ||
276 | ****************************************************************************/ | ||
277 | static struct orion_spi_info orion5x_spi_plat_data = { | ||
278 | .tclk = 0, | ||
279 | }; | ||
280 | |||
281 | static struct resource orion5x_spi_resources[] = { | ||
282 | { | ||
283 | .name = "spi base", | ||
284 | .start = SPI_PHYS_BASE, | ||
285 | .end = SPI_PHYS_BASE + 0x1f, | ||
286 | .flags = IORESOURCE_MEM, | ||
287 | }, | ||
288 | }; | ||
289 | |||
290 | static struct platform_device orion5x_spi = { | ||
291 | .name = "orion_spi", | ||
292 | .id = 0, | ||
293 | .dev = { | ||
294 | .platform_data = &orion5x_spi_plat_data, | ||
295 | }, | ||
296 | .num_resources = ARRAY_SIZE(orion5x_spi_resources), | ||
297 | .resource = orion5x_spi_resources, | ||
298 | }; | ||
299 | |||
300 | void __init orion5x_spi_init() | ||
301 | { | ||
302 | platform_device_register(&orion5x_spi); | ||
303 | } | ||
304 | |||
305 | |||
306 | /***************************************************************************** | ||
274 | * UART0 | 307 | * UART0 |
275 | ****************************************************************************/ | 308 | ****************************************************************************/ |
276 | static struct plat_serial8250_port orion5x_uart0_data[] = { | 309 | static struct plat_serial8250_port orion5x_uart0_data[] = { |
@@ -462,6 +495,13 @@ int orion5x_tclk; | |||
462 | 495 | ||
463 | int __init orion5x_find_tclk(void) | 496 | int __init orion5x_find_tclk(void) |
464 | { | 497 | { |
498 | u32 dev, rev; | ||
499 | |||
500 | orion5x_pcie_id(&dev, &rev); | ||
501 | if (dev == MV88F6183_DEV_ID && | ||
502 | (readl(MPP_RESET_SAMPLE) & 0x00000200) == 0) | ||
503 | return 133333333; | ||
504 | |||
465 | return 166666667; | 505 | return 166666667; |
466 | } | 506 | } |
467 | 507 | ||
@@ -510,6 +550,12 @@ static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name) | |||
510 | } else { | 550 | } else { |
511 | *dev_name = "MV88F5181(L)-Rev-Unsupported"; | 551 | *dev_name = "MV88F5181(L)-Rev-Unsupported"; |
512 | } | 552 | } |
553 | } else if (*dev == MV88F6183_DEV_ID) { | ||
554 | if (*rev == MV88F6183_REV_B0) { | ||
555 | *dev_name = "MV88F6183-Rev-B0"; | ||
556 | } else { | ||
557 | *dev_name = "MV88F6183-Rev-Unsupported"; | ||
558 | } | ||
513 | } else { | 559 | } else { |
514 | *dev_name = "Device-Unknown"; | 560 | *dev_name = "Device-Unknown"; |
515 | } | 561 | } |
@@ -524,6 +570,7 @@ void __init orion5x_init(void) | |||
524 | printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk); | 570 | printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk); |
525 | 571 | ||
526 | orion5x_eth_shared_data.t_clk = orion5x_tclk; | 572 | orion5x_eth_shared_data.t_clk = orion5x_tclk; |
573 | orion5x_spi_plat_data.tclk = orion5x_tclk; | ||
527 | orion5x_uart0_data[0].uartclk = orion5x_tclk; | 574 | orion5x_uart0_data[0].uartclk = orion5x_tclk; |
528 | orion5x_uart1_data[0].uartclk = orion5x_tclk; | 575 | orion5x_uart1_data[0].uartclk = orion5x_tclk; |
529 | 576 | ||