Loading arch/arm/mach-dove/Kconfig +6 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,12 @@ config MACH_DOVE_DB Say 'Y' here if you want your kernel to support the Marvell DB-MV88AP510 Development Board. config MACH_CM_A510 bool "CompuLab CM-A510 Board" help Say 'Y' here if you want your kernel to support the CompuLab CM-A510 Board. endmenu endif arch/arm/mach-dove/Makefile +2 −1 Original line number Diff line number Diff line obj-y += common.o addr-map.o irq.o pcie.o obj-y += common.o addr-map.o irq.o pcie.o mpp.o obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o obj-$(CONFIG_MACH_CM_A510) += cm-a510.o arch/arm/mach-dove/cm-a510.c 0 → 100644 +95 −0 Original line number Diff line number Diff line /* * arch/arm/mach-dove/cm-a510.c * * Copyright (C) 2010 CompuLab, Ltd. * Konstantin Sinyuk <kostyas@compulab.co.il> * * Based on Marvell DB-MV88AP510-BP Development Board Setup * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> #include <linux/ata_platform.h> #include <linux/mv643xx_eth.h> #include <linux/spi/spi.h> #include <linux/spi/flash.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <mach/dove.h> #include "common.h" static struct mv643xx_eth_platform_data cm_a510_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT, }; static struct mv_sata_platform_data cm_a510_sata_data = { .n_ports = 1, }; /* * SPI Devices: * SPI0: 1M Flash Winbond w25q32bv */ static const struct flash_platform_data cm_a510_spi_flash_data = { .type = "w25q32bv", }; static struct spi_board_info __initdata cm_a510_spi_flash_info[] = { { .modalias = "m25p80", .platform_data = &cm_a510_spi_flash_data, .irq = -1, .max_speed_hz = 20000000, .bus_num = 0, .chip_select = 0, }, }; static int __init cm_a510_pci_init(void) { if (machine_is_cm_a510()) dove_pcie_init(1, 1); return 0; } subsys_initcall(cm_a510_pci_init); /* Board Init */ static void __init cm_a510_init(void) { /* * Basic Dove setup. Needs to be called early. */ dove_init(); dove_ge00_init(&cm_a510_ge00_data); dove_ehci0_init(); dove_ehci1_init(); dove_sata_init(&cm_a510_sata_data); dove_sdio0_init(); dove_sdio1_init(); dove_spi0_init(); dove_spi1_init(); dove_uart0_init(); dove_uart1_init(); dove_i2c_init(); spi_register_board_info(cm_a510_spi_flash_info, ARRAY_SIZE(cm_a510_spi_flash_info)); } MACHINE_START(CM_A510, "Compulab CM-A510 Board") .boot_params = 0x00000100, .init_machine = cm_a510_init, .map_io = dove_map_io, .init_irq = dove_init_irq, .timer = &dove_timer, MACHINE_END arch/arm/mach-dove/include/mach/dove.h +8 −1 Original line number Diff line number Diff line Loading @@ -131,14 +131,21 @@ #define DOVE_RESET_SAMPLE_LO (DOVE_MPP_VIRT_BASE | 0x014) #define DOVE_RESET_SAMPLE_HI (DOVE_MPP_VIRT_BASE | 0x018) #define DOVE_GPIO_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0400) #define DOVE_GPIO2_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe8400) #define DOVE_MPP_GENERAL_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe803c) #define DOVE_AU1_SPDIFO_GPIO_EN (1 << 1) #define DOVE_NAND_GPIO_EN (1 << 0) #define DOVE_MPP_CTRL4_VIRT_BASE (DOVE_GPIO_VIRT_BASE + 0x40) #define DOVE_SPI_GPIO_SEL (1 << 5) #define DOVE_UART1_GPIO_SEL (1 << 4) #define DOVE_AU1_GPIO_SEL (1 << 3) #define DOVE_CAM_GPIO_SEL (1 << 2) #define DOVE_SD1_GPIO_SEL (1 << 1) #define DOVE_SD0_GPIO_SEL (1 << 0) /* Power Management */ #define DOVE_PMU_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0000) #define DOVE_PMU_SIG_CTRL (DOVE_PMU_VIRT_BASE + 0x802c) /* Real Time Clock */ #define DOVE_RTC_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xd8500) Loading arch/arm/mach-dove/include/mach/gpio.h +4 −2 Original line number Diff line number Diff line Loading @@ -14,12 +14,14 @@ #include <plat/gpio.h> #include <asm-generic/gpio.h> /* cansleep wrappers */ #define GPIO_MAX 64 #define GPIO_MAX 72 #define GPIO_BASE_LO (DOVE_GPIO_VIRT_BASE + 0x00) #define GPIO_BASE_HI (DOVE_GPIO_VIRT_BASE + 0x20) #define GPIO_BASE(pin) ((pin < 32) ? GPIO_BASE_LO : GPIO_BASE_HI) #define GPIO_BASE(pin) ((pin < 32) ? GPIO_BASE_LO : \ ((pin < 64) ? GPIO_BASE_HI : \ DOVE_GPIO2_VIRT_BASE)) #define GPIO_OUT(pin) (GPIO_BASE(pin) + 0x00) #define GPIO_IO_CONF(pin) (GPIO_BASE(pin) + 0x04) Loading Loading
arch/arm/mach-dove/Kconfig +6 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,12 @@ config MACH_DOVE_DB Say 'Y' here if you want your kernel to support the Marvell DB-MV88AP510 Development Board. config MACH_CM_A510 bool "CompuLab CM-A510 Board" help Say 'Y' here if you want your kernel to support the CompuLab CM-A510 Board. endmenu endif
arch/arm/mach-dove/Makefile +2 −1 Original line number Diff line number Diff line obj-y += common.o addr-map.o irq.o pcie.o obj-y += common.o addr-map.o irq.o pcie.o mpp.o obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o obj-$(CONFIG_MACH_CM_A510) += cm-a510.o
arch/arm/mach-dove/cm-a510.c 0 → 100644 +95 −0 Original line number Diff line number Diff line /* * arch/arm/mach-dove/cm-a510.c * * Copyright (C) 2010 CompuLab, Ltd. * Konstantin Sinyuk <kostyas@compulab.co.il> * * Based on Marvell DB-MV88AP510-BP Development Board Setup * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> #include <linux/ata_platform.h> #include <linux/mv643xx_eth.h> #include <linux/spi/spi.h> #include <linux/spi/flash.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <mach/dove.h> #include "common.h" static struct mv643xx_eth_platform_data cm_a510_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT, }; static struct mv_sata_platform_data cm_a510_sata_data = { .n_ports = 1, }; /* * SPI Devices: * SPI0: 1M Flash Winbond w25q32bv */ static const struct flash_platform_data cm_a510_spi_flash_data = { .type = "w25q32bv", }; static struct spi_board_info __initdata cm_a510_spi_flash_info[] = { { .modalias = "m25p80", .platform_data = &cm_a510_spi_flash_data, .irq = -1, .max_speed_hz = 20000000, .bus_num = 0, .chip_select = 0, }, }; static int __init cm_a510_pci_init(void) { if (machine_is_cm_a510()) dove_pcie_init(1, 1); return 0; } subsys_initcall(cm_a510_pci_init); /* Board Init */ static void __init cm_a510_init(void) { /* * Basic Dove setup. Needs to be called early. */ dove_init(); dove_ge00_init(&cm_a510_ge00_data); dove_ehci0_init(); dove_ehci1_init(); dove_sata_init(&cm_a510_sata_data); dove_sdio0_init(); dove_sdio1_init(); dove_spi0_init(); dove_spi1_init(); dove_uart0_init(); dove_uart1_init(); dove_i2c_init(); spi_register_board_info(cm_a510_spi_flash_info, ARRAY_SIZE(cm_a510_spi_flash_info)); } MACHINE_START(CM_A510, "Compulab CM-A510 Board") .boot_params = 0x00000100, .init_machine = cm_a510_init, .map_io = dove_map_io, .init_irq = dove_init_irq, .timer = &dove_timer, MACHINE_END
arch/arm/mach-dove/include/mach/dove.h +8 −1 Original line number Diff line number Diff line Loading @@ -131,14 +131,21 @@ #define DOVE_RESET_SAMPLE_LO (DOVE_MPP_VIRT_BASE | 0x014) #define DOVE_RESET_SAMPLE_HI (DOVE_MPP_VIRT_BASE | 0x018) #define DOVE_GPIO_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0400) #define DOVE_GPIO2_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe8400) #define DOVE_MPP_GENERAL_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xe803c) #define DOVE_AU1_SPDIFO_GPIO_EN (1 << 1) #define DOVE_NAND_GPIO_EN (1 << 0) #define DOVE_MPP_CTRL4_VIRT_BASE (DOVE_GPIO_VIRT_BASE + 0x40) #define DOVE_SPI_GPIO_SEL (1 << 5) #define DOVE_UART1_GPIO_SEL (1 << 4) #define DOVE_AU1_GPIO_SEL (1 << 3) #define DOVE_CAM_GPIO_SEL (1 << 2) #define DOVE_SD1_GPIO_SEL (1 << 1) #define DOVE_SD0_GPIO_SEL (1 << 0) /* Power Management */ #define DOVE_PMU_VIRT_BASE (DOVE_SB_REGS_VIRT_BASE | 0xd0000) #define DOVE_PMU_SIG_CTRL (DOVE_PMU_VIRT_BASE + 0x802c) /* Real Time Clock */ #define DOVE_RTC_PHYS_BASE (DOVE_SB_REGS_PHYS_BASE | 0xd8500) Loading
arch/arm/mach-dove/include/mach/gpio.h +4 −2 Original line number Diff line number Diff line Loading @@ -14,12 +14,14 @@ #include <plat/gpio.h> #include <asm-generic/gpio.h> /* cansleep wrappers */ #define GPIO_MAX 64 #define GPIO_MAX 72 #define GPIO_BASE_LO (DOVE_GPIO_VIRT_BASE + 0x00) #define GPIO_BASE_HI (DOVE_GPIO_VIRT_BASE + 0x20) #define GPIO_BASE(pin) ((pin < 32) ? GPIO_BASE_LO : GPIO_BASE_HI) #define GPIO_BASE(pin) ((pin < 32) ? GPIO_BASE_LO : \ ((pin < 64) ? GPIO_BASE_HI : \ DOVE_GPIO2_VIRT_BASE)) #define GPIO_OUT(pin) (GPIO_BASE(pin) + 0x00) #define GPIO_IO_CONF(pin) (GPIO_BASE(pin) + 0x04) Loading