mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
Merge branch 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci
* 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci: (48 commits) Revert "rtc: omap: let device wakeup capability be configured from chip init logic" DM365: Added more PINMUX configurations for AEMIF DM365: Make CLKOUTx available DM365: Added PINMUX definitions for GPIO30..32 Davinci: iotable based ioremap() interception Davinci: pinmux - use ioremap() Davinci: aintc/cpintc - use ioremap() Davinci: psc - use ioremap() Davinci: timer - use ioremap() Davinci: jtag_id - use ioremap() Davinci: da8xx: rtc - use ioremap Davinci: gpio - use ioremap() davinci: edma: fix coding style issue related to breaking lines davinci: edma: use BIT() wherever possible davinci: edma: fix coding style issue related to usage of braces davinci: edma: use a more intuitive name for edma_info Davinci: serial - conditional reset via pwremu Davinci: serial - use ioremap() Davinci: serial - remove unnecessary define Davinci: watchdog reset separation across socs ... Fix up trivial conflict in arch/arm/Kconfig due to removal of "select GENERIC_TIME"
This commit is contained in:
@@ -760,7 +760,6 @@ config ARCH_NOMADIK
|
||||
|
||||
config ARCH_DAVINCI
|
||||
bool "TI DaVinci"
|
||||
select CPU_ARM926T
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select ZONE_DMA
|
||||
|
||||
@@ -7,6 +7,7 @@ config CP_INTC
|
||||
bool
|
||||
|
||||
config ARCH_DAVINCI_DMx
|
||||
select CPU_ARM926T
|
||||
bool
|
||||
|
||||
menu "TI DaVinci Implementations"
|
||||
@@ -41,6 +42,7 @@ config ARCH_DAVINCI_DA850
|
||||
select ARCH_HAS_CPUFREQ
|
||||
|
||||
config ARCH_DAVINCI_DA8XX
|
||||
select CPU_ARM926T
|
||||
bool
|
||||
|
||||
config ARCH_DAVINCI_DM365
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
#define DA830_EVM_PHY_MASK 0x0
|
||||
#define DA830_EVM_MDIO_FREQUENCY 2200000 /* PHY bus frequency */
|
||||
|
||||
#define DA830_EMIF25_ASYNC_DATA_CE3_BASE 0x62000000
|
||||
#define DA830_EMIF25_CONTROL_BASE 0x68000000
|
||||
|
||||
/*
|
||||
* USB1 VBUS is controlled by GPIO1[15], over-current is reported on GPIO2[4].
|
||||
*/
|
||||
@@ -157,7 +154,7 @@ static __init void da830_evm_usb_init(void)
|
||||
__func__, ret);
|
||||
}
|
||||
|
||||
ret = da8xx_pinmux_setup(da830_evm_usb11_pins);
|
||||
ret = davinci_cfg_reg_list(da830_evm_usb11_pins);
|
||||
if (ret) {
|
||||
pr_warning("%s: USB 1.1 PinMux setup failed: %d\n",
|
||||
__func__, ret);
|
||||
@@ -229,15 +226,22 @@ static const short da830_evm_mmc_sd_pins[] = {
|
||||
};
|
||||
|
||||
#define DA830_MMCSD_WP_PIN GPIO_TO_PIN(2, 1)
|
||||
#define DA830_MMCSD_CD_PIN GPIO_TO_PIN(2, 2)
|
||||
|
||||
static int da830_evm_mmc_get_ro(int index)
|
||||
{
|
||||
return gpio_get_value(DA830_MMCSD_WP_PIN);
|
||||
}
|
||||
|
||||
static int da830_evm_mmc_get_cd(int index)
|
||||
{
|
||||
return !gpio_get_value(DA830_MMCSD_CD_PIN);
|
||||
}
|
||||
|
||||
static struct davinci_mmc_config da830_evm_mmc_config = {
|
||||
.get_ro = da830_evm_mmc_get_ro,
|
||||
.wires = 4,
|
||||
.get_cd = da830_evm_mmc_get_cd,
|
||||
.wires = 8,
|
||||
.max_freq = 50000000,
|
||||
.caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
||||
.version = MMC_CTLR_VERSION_2,
|
||||
@@ -247,7 +251,7 @@ static inline void da830_evm_init_mmc(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = da8xx_pinmux_setup(da830_evm_mmc_sd_pins);
|
||||
ret = davinci_cfg_reg_list(da830_evm_mmc_sd_pins);
|
||||
if (ret) {
|
||||
pr_warning("da830_evm_init: mmc/sd mux setup failed: %d\n",
|
||||
ret);
|
||||
@@ -262,6 +266,14 @@ static inline void da830_evm_init_mmc(void)
|
||||
}
|
||||
gpio_direction_input(DA830_MMCSD_WP_PIN);
|
||||
|
||||
ret = gpio_request(DA830_MMCSD_CD_PIN, "MMC CD\n");
|
||||
if (ret) {
|
||||
pr_warning("da830_evm_init: can not open GPIO %d\n",
|
||||
DA830_MMCSD_CD_PIN);
|
||||
return;
|
||||
}
|
||||
gpio_direction_input(DA830_MMCSD_CD_PIN);
|
||||
|
||||
ret = da8xx_register_mmcsd0(&da830_evm_mmc_config);
|
||||
if (ret) {
|
||||
pr_warning("da830_evm_init: mmc/sd registration failed: %d\n",
|
||||
@@ -360,13 +372,13 @@ static struct davinci_nand_pdata da830_evm_nand_pdata = {
|
||||
|
||||
static struct resource da830_evm_nand_resources[] = {
|
||||
[0] = { /* First memory resource is NAND I/O window */
|
||||
.start = DA830_EMIF25_ASYNC_DATA_CE3_BASE,
|
||||
.end = DA830_EMIF25_ASYNC_DATA_CE3_BASE + PAGE_SIZE - 1,
|
||||
.start = DA8XX_AEMIF_CS3_BASE,
|
||||
.end = DA8XX_AEMIF_CS3_BASE + PAGE_SIZE - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = { /* Second memory resource is AEMIF control registers */
|
||||
.start = DA830_EMIF25_CONTROL_BASE,
|
||||
.end = DA830_EMIF25_CONTROL_BASE + SZ_32K - 1,
|
||||
.start = DA8XX_AEMIF_CTL_BASE,
|
||||
.end = DA8XX_AEMIF_CTL_BASE + SZ_32K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
@@ -392,7 +404,7 @@ static inline void da830_evm_init_nand(int mux_mode)
|
||||
return;
|
||||
}
|
||||
|
||||
ret = da8xx_pinmux_setup(da830_evm_emif25_pins);
|
||||
ret = davinci_cfg_reg_list(da830_evm_emif25_pins);
|
||||
if (ret)
|
||||
pr_warning("da830_evm_init: emif25 mux setup failed: %d\n",
|
||||
ret);
|
||||
@@ -412,7 +424,7 @@ static inline void da830_evm_init_lcdc(int mux_mode)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = da8xx_pinmux_setup(da830_lcdcntl_pins);
|
||||
ret = davinci_cfg_reg_list(da830_lcdcntl_pins);
|
||||
if (ret)
|
||||
pr_warning("da830_evm_init: lcdcntl mux setup failed: %d\n",
|
||||
ret);
|
||||
@@ -492,7 +504,7 @@ static __init void da830_evm_init(void)
|
||||
pr_warning("da830_evm_init: edma registration failed: %d\n",
|
||||
ret);
|
||||
|
||||
ret = da8xx_pinmux_setup(da830_i2c0_pins);
|
||||
ret = davinci_cfg_reg_list(da830_i2c0_pins);
|
||||
if (ret)
|
||||
pr_warning("da830_evm_init: i2c0 mux setup failed: %d\n",
|
||||
ret);
|
||||
@@ -508,7 +520,7 @@ static __init void da830_evm_init(void)
|
||||
soc_info->emac_pdata->mdio_max_freq = DA830_EVM_MDIO_FREQUENCY;
|
||||
soc_info->emac_pdata->rmii_en = 1;
|
||||
|
||||
ret = da8xx_pinmux_setup(da830_cpgmac_pins);
|
||||
ret = davinci_cfg_reg_list(da830_cpgmac_pins);
|
||||
if (ret)
|
||||
pr_warning("da830_evm_init: cpgmac mux setup failed: %d\n",
|
||||
ret);
|
||||
@@ -527,7 +539,7 @@ static __init void da830_evm_init(void)
|
||||
i2c_register_board_info(1, da830_evm_i2c_devices,
|
||||
ARRAY_SIZE(da830_evm_i2c_devices));
|
||||
|
||||
ret = da8xx_pinmux_setup(da830_evm_mcasp1_pins);
|
||||
ret = davinci_cfg_reg_list(da830_evm_mcasp1_pins);
|
||||
if (ret)
|
||||
pr_warning("da830_evm_init: mcasp1 mux setup failed: %d\n",
|
||||
ret);
|
||||
@@ -549,14 +561,6 @@ static int __init da830_evm_console_init(void)
|
||||
console_initcall(da830_evm_console_init);
|
||||
#endif
|
||||
|
||||
static __init void da830_evm_irq_init(void)
|
||||
{
|
||||
struct davinci_soc_info *soc_info = &davinci_soc_info;
|
||||
|
||||
cp_intc_init((void __iomem *)DA8XX_CP_INTC_VIRT, DA830_N_CP_INTC_IRQ,
|
||||
soc_info->intc_irq_prios);
|
||||
}
|
||||
|
||||
static void __init da830_evm_map_io(void)
|
||||
{
|
||||
da830_init();
|
||||
@@ -567,7 +571,7 @@ MACHINE_START(DAVINCI_DA830_EVM, "DaVinci DA830/OMAP-L137 EVM")
|
||||
.io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
|
||||
.boot_params = (DA8XX_DDR_BASE + 0x100),
|
||||
.map_io = da830_evm_map_io,
|
||||
.init_irq = da830_evm_irq_init,
|
||||
.init_irq = cp_intc_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = da830_evm_init,
|
||||
MACHINE_END
|
||||
|
||||
@@ -206,12 +206,12 @@ static __init void da850_evm_setup_nor_nand(void)
|
||||
int ret = 0;
|
||||
|
||||
if (ui_card_detected & !HAS_MMC) {
|
||||
ret = da8xx_pinmux_setup(da850_nand_pins);
|
||||
ret = davinci_cfg_reg_list(da850_nand_pins);
|
||||
if (ret)
|
||||
pr_warning("da850_evm_init: nand mux setup failed: "
|
||||
"%d\n", ret);
|
||||
|
||||
ret = da8xx_pinmux_setup(da850_nor_pins);
|
||||
ret = davinci_cfg_reg_list(da850_nor_pins);
|
||||
if (ret)
|
||||
pr_warning("da850_evm_init: nor mux setup failed: %d\n",
|
||||
ret);
|
||||
@@ -568,12 +568,12 @@ static int __init da850_evm_config_emac(void)
|
||||
|
||||
if (rmii_en) {
|
||||
val |= BIT(8);
|
||||
ret = da8xx_pinmux_setup(da850_rmii_pins);
|
||||
ret = davinci_cfg_reg_list(da850_rmii_pins);
|
||||
pr_info("EMAC: RMII PHY configured, MII PHY will not be"
|
||||
" functional\n");
|
||||
} else {
|
||||
val &= ~BIT(8);
|
||||
ret = da8xx_pinmux_setup(da850_cpgmac_pins);
|
||||
ret = davinci_cfg_reg_list(da850_cpgmac_pins);
|
||||
pr_info("EMAC: MII PHY configured, RMII PHY will not be"
|
||||
" functional\n");
|
||||
}
|
||||
@@ -626,7 +626,7 @@ static __init void da850_evm_init(void)
|
||||
pr_warning("da850_evm_init: edma registration failed: %d\n",
|
||||
ret);
|
||||
|
||||
ret = da8xx_pinmux_setup(da850_i2c0_pins);
|
||||
ret = davinci_cfg_reg_list(da850_i2c0_pins);
|
||||
if (ret)
|
||||
pr_warning("da850_evm_init: i2c0 mux setup failed: %d\n",
|
||||
ret);
|
||||
@@ -643,7 +643,7 @@ static __init void da850_evm_init(void)
|
||||
ret);
|
||||
|
||||
if (HAS_MMC) {
|
||||
ret = da8xx_pinmux_setup(da850_mmcsd0_pins);
|
||||
ret = davinci_cfg_reg_list(da850_mmcsd0_pins);
|
||||
if (ret)
|
||||
pr_warning("da850_evm_init: mmcsd0 mux setup failed:"
|
||||
" %d\n", ret);
|
||||
@@ -679,20 +679,20 @@ static __init void da850_evm_init(void)
|
||||
__raw_writel(0, IO_ADDRESS(DA8XX_UART1_BASE) + 0x30);
|
||||
__raw_writel(0, IO_ADDRESS(DA8XX_UART0_BASE) + 0x30);
|
||||
|
||||
ret = da8xx_pinmux_setup(da850_mcasp_pins);
|
||||
ret = davinci_cfg_reg_list(da850_mcasp_pins);
|
||||
if (ret)
|
||||
pr_warning("da850_evm_init: mcasp mux setup failed: %d\n",
|
||||
ret);
|
||||
|
||||
da8xx_register_mcasp(0, &da850_evm_snd_data);
|
||||
|
||||
ret = da8xx_pinmux_setup(da850_lcdcntl_pins);
|
||||
ret = davinci_cfg_reg_list(da850_lcdcntl_pins);
|
||||
if (ret)
|
||||
pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
|
||||
ret);
|
||||
|
||||
/* Handle board specific muxing for LCD here */
|
||||
ret = da8xx_pinmux_setup(da850_evm_lcdc_pins);
|
||||
ret = davinci_cfg_reg_list(da850_evm_lcdc_pins);
|
||||
if (ret)
|
||||
pr_warning("da850_evm_init: evm specific lcd mux setup "
|
||||
"failed: %d\n", ret);
|
||||
@@ -736,14 +736,6 @@ static int __init da850_evm_console_init(void)
|
||||
console_initcall(da850_evm_console_init);
|
||||
#endif
|
||||
|
||||
static __init void da850_evm_irq_init(void)
|
||||
{
|
||||
struct davinci_soc_info *soc_info = &davinci_soc_info;
|
||||
|
||||
cp_intc_init((void __iomem *)DA8XX_CP_INTC_VIRT, DA850_N_CP_INTC_IRQ,
|
||||
soc_info->intc_irq_prios);
|
||||
}
|
||||
|
||||
static void __init da850_evm_map_io(void)
|
||||
{
|
||||
da850_init();
|
||||
@@ -754,7 +746,7 @@ MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138 EVM")
|
||||
.io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
|
||||
.boot_params = (DA8XX_DDR_BASE + 0x100),
|
||||
.map_io = da850_evm_map_io,
|
||||
.init_irq = da850_evm_irq_init,
|
||||
.init_irq = cp_intc_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = da850_evm_init,
|
||||
MACHINE_END
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
#include <mach/mmc.h>
|
||||
#include <mach/usb.h>
|
||||
|
||||
#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000
|
||||
#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
|
||||
|
||||
/* NOTE: this is geared for the standard config, with a socketed
|
||||
* 2 GByte Micron NAND (MT29F16G08FAA) using 128KB sectors. If you
|
||||
* swap chips, maybe with a different block size, partitioning may
|
||||
@@ -86,12 +83,12 @@ static struct davinci_nand_pdata davinci_nand_data = {
|
||||
|
||||
static struct resource davinci_nand_resources[] = {
|
||||
{
|
||||
.start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_32M - 1,
|
||||
.start = DM355_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DM355_ASYNC_EMIF_DATA_CE0_BASE + SZ_32M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = DAVINCI_ASYNC_EMIF_CONTROL_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
.start = DM355_ASYNC_EMIF_CONTROL_BASE,
|
||||
.end = DM355_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
@@ -353,17 +350,12 @@ static __init void dm355_evm_init(void)
|
||||
dm355_init_asp1(ASP1_TX_EVT_EN | ASP1_RX_EVT_EN, &dm355_evm_snd_data);
|
||||
}
|
||||
|
||||
static __init void dm355_evm_irq_init(void)
|
||||
{
|
||||
davinci_irq_init();
|
||||
}
|
||||
|
||||
MACHINE_START(DAVINCI_DM355_EVM, "DaVinci DM355 EVM")
|
||||
.phys_io = IO_PHYS,
|
||||
.io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
|
||||
.boot_params = (0x80000100),
|
||||
.map_io = dm355_evm_map_io,
|
||||
.init_irq = dm355_evm_irq_init,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = dm355_evm_init,
|
||||
MACHINE_END
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
#include <mach/mmc.h>
|
||||
#include <mach/usb.h>
|
||||
|
||||
#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000
|
||||
#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
|
||||
|
||||
/* NOTE: this is geared for the standard config, with a socketed
|
||||
* 2 GByte Micron NAND (MT29F16G08FAA) using 128KB sectors. If you
|
||||
* swap chips, maybe with a different block size, partitioning may
|
||||
@@ -82,12 +79,12 @@ static struct davinci_nand_pdata davinci_nand_data = {
|
||||
|
||||
static struct resource davinci_nand_resources[] = {
|
||||
{
|
||||
.start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_32M - 1,
|
||||
.start = DM355_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DM355_ASYNC_EMIF_DATA_CE0_BASE + SZ_32M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = DAVINCI_ASYNC_EMIF_CONTROL_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
.start = DM355_ASYNC_EMIF_CONTROL_BASE,
|
||||
.end = DM355_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
@@ -272,17 +269,12 @@ static __init void dm355_leopard_init(void)
|
||||
ARRAY_SIZE(dm355_leopard_spi_info));
|
||||
}
|
||||
|
||||
static __init void dm355_leopard_irq_init(void)
|
||||
{
|
||||
davinci_irq_init();
|
||||
}
|
||||
|
||||
MACHINE_START(DM355_LEOPARD, "DaVinci DM355 leopard")
|
||||
.phys_io = IO_PHYS,
|
||||
.io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
|
||||
.boot_params = (0x80000100),
|
||||
.map_io = dm355_leopard_map_io,
|
||||
.init_irq = dm355_leopard_irq_init,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = dm355_leopard_init,
|
||||
MACHINE_END
|
||||
|
||||
@@ -54,11 +54,6 @@ static inline int have_tvp7002(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#define DM365_ASYNC_EMIF_CONTROL_BASE 0x01d10000
|
||||
#define DM365_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
|
||||
#define DM365_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
|
||||
|
||||
#define DM365_EVM_PHY_MASK (0x2)
|
||||
#define DM365_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
|
||||
|
||||
@@ -613,17 +608,12 @@ static __init void dm365_evm_init(void)
|
||||
ARRAY_SIZE(dm365_evm_spi_info));
|
||||
}
|
||||
|
||||
static __init void dm365_evm_irq_init(void)
|
||||
{
|
||||
davinci_irq_init();
|
||||
}
|
||||
|
||||
MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM")
|
||||
.phys_io = IO_PHYS,
|
||||
.io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
|
||||
.boot_params = (0x80000100),
|
||||
.map_io = dm365_evm_map_io,
|
||||
.init_irq = dm365_evm_irq_init,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = dm365_evm_init,
|
||||
MACHINE_END
|
||||
|
||||
@@ -41,14 +41,6 @@
|
||||
#define DM644X_EVM_PHY_MASK (0x2)
|
||||
#define DM644X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
|
||||
|
||||
#define DAVINCI_CFC_ATA_BASE 0x01C66000
|
||||
|
||||
#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e00000
|
||||
#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
|
||||
#define DAVINCI_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
|
||||
#define DAVINCI_ASYNC_EMIF_DATA_CE2_BASE 0x06000000
|
||||
#define DAVINCI_ASYNC_EMIF_DATA_CE3_BASE 0x08000000
|
||||
|
||||
#define LXT971_PHY_ID (0x001378e2)
|
||||
#define LXT971_PHY_MASK (0xfffffff0)
|
||||
|
||||
@@ -92,8 +84,8 @@ static struct physmap_flash_data davinci_evm_norflash_data = {
|
||||
/* NOTE: CFI probe will correctly detect flash part as 32M, but EMIF
|
||||
* limits addresses to 16M, so using addresses past 16M will wrap */
|
||||
static struct resource davinci_evm_norflash_resource = {
|
||||
.start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_16M - 1,
|
||||
.start = DM644X_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DM644X_ASYNC_EMIF_DATA_CE0_BASE + SZ_16M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
@@ -111,7 +103,7 @@ static struct platform_device davinci_evm_norflash_device = {
|
||||
* It may used instead of the (default) NOR chip to boot, using TI's
|
||||
* tools to install the secondary boot loader (UBL) and U-Boot.
|
||||
*/
|
||||
struct mtd_partition davinci_evm_nandflash_partition[] = {
|
||||
static struct mtd_partition davinci_evm_nandflash_partition[] = {
|
||||
/* Bootloader layout depends on whose u-boot is installed, but we
|
||||
* can hide all the details.
|
||||
* - block 0 for u-boot environment ... in mainline u-boot
|
||||
@@ -154,12 +146,12 @@ static struct davinci_nand_pdata davinci_evm_nandflash_data = {
|
||||
|
||||
static struct resource davinci_evm_nandflash_resource[] = {
|
||||
{
|
||||
.start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_16M - 1,
|
||||
.start = DM644X_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DM644X_ASYNC_EMIF_DATA_CE0_BASE + SZ_16M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = DAVINCI_ASYNC_EMIF_CONTROL_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
.start = DM644X_ASYNC_EMIF_CONTROL_BASE,
|
||||
.end = DM644X_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
@@ -258,32 +250,6 @@ static struct platform_device rtc_dev = {
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct resource ide_resources[] = {
|
||||
{
|
||||
.start = DAVINCI_CFC_ATA_BASE,
|
||||
.end = DAVINCI_CFC_ATA_BASE + 0x7ff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_IDE,
|
||||
.end = IRQ_IDE,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static u64 ide_dma_mask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct platform_device ide_dev = {
|
||||
.name = "palm_bk3710",
|
||||
.id = -1,
|
||||
.resource = ide_resources,
|
||||
.num_resources = ARRAY_SIZE(ide_resources),
|
||||
.dev = {
|
||||
.dma_mask = &ide_dma_mask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
};
|
||||
|
||||
static struct snd_platform_data dm644x_evm_snd_data;
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -704,10 +670,7 @@ static __init void davinci_evm_init(void)
|
||||
pr_warning("WARNING: both IDE and Flash are "
|
||||
"enabled, but they share AEMIF pins.\n"
|
||||
"\tDisable IDE for NAND/NOR support.\n");
|
||||
davinci_cfg_reg(DM644X_HPIEN_DISABLE);
|
||||
davinci_cfg_reg(DM644X_ATAEN);
|
||||
davinci_cfg_reg(DM644X_HDIREN);
|
||||
platform_device_register(&ide_dev);
|
||||
davinci_init_ide();
|
||||
} else if (HAS_NAND || HAS_NOR) {
|
||||
davinci_cfg_reg(DM644X_HPIEN_DISABLE);
|
||||
davinci_cfg_reg(DM644X_ATAEN_DISABLE);
|
||||
@@ -741,18 +704,13 @@ static __init void davinci_evm_init(void)
|
||||
|
||||
}
|
||||
|
||||
static __init void davinci_evm_irq_init(void)
|
||||
{
|
||||
davinci_irq_init();
|
||||
}
|
||||
|
||||
MACHINE_START(DAVINCI_EVM, "DaVinci DM644x EVM")
|
||||
/* Maintainer: MontaVista Software <source@mvista.com> */
|
||||
.phys_io = IO_PHYS,
|
||||
.io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
|
||||
.boot_params = (DAVINCI_DDR_BASE + 0x100),
|
||||
.map_io = davinci_evm_map_io,
|
||||
.init_irq = davinci_evm_irq_init,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = davinci_evm_init,
|
||||
MACHINE_END
|
||||
|
||||
@@ -80,17 +80,14 @@ static struct davinci_nand_pdata davinci_nand_data = {
|
||||
.options = 0,
|
||||
};
|
||||
|
||||
#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x20008000
|
||||
#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x42000000
|
||||
|
||||
static struct resource davinci_nand_resources[] = {
|
||||
{
|
||||
.start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_32M - 1,
|
||||
.start = DM646X_ASYNC_EMIF_CS2_SPACE_BASE,
|
||||
.end = DM646X_ASYNC_EMIF_CS2_SPACE_BASE + SZ_32M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = DAVINCI_ASYNC_EMIF_CONTROL_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
.start = DM646X_ASYNC_EMIF_CONTROL_BASE,
|
||||
.end = DM646X_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
@@ -736,17 +733,12 @@ static __init void evm_init(void)
|
||||
platform_device_register(&davinci_nand_device);
|
||||
|
||||
if (HAS_ATA)
|
||||
dm646x_init_ide();
|
||||
davinci_init_ide();
|
||||
|
||||
soc_info->emac_pdata->phy_mask = DM646X_EVM_PHY_MASK;
|
||||
soc_info->emac_pdata->mdio_max_freq = DM646X_EVM_MDIO_FREQUENCY;
|
||||
}
|
||||
|
||||
static __init void davinci_dm646x_evm_irq_init(void)
|
||||
{
|
||||
davinci_irq_init();
|
||||
}
|
||||
|
||||
#define DM646X_EVM_REF_FREQ 27000000
|
||||
#define DM6467T_EVM_REF_FREQ 33000000
|
||||
|
||||
@@ -763,7 +755,7 @@ MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM")
|
||||
.io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
|
||||
.boot_params = (0x80000100),
|
||||
.map_io = davinci_map_io,
|
||||
.init_irq = davinci_dm646x_evm_irq_init,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = evm_init,
|
||||
MACHINE_END
|
||||
@@ -773,7 +765,7 @@ MACHINE_START(DAVINCI_DM6467TEVM, "DaVinci DM6467T EVM")
|
||||
.io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
|
||||
.boot_params = (0x80000100),
|
||||
.map_io = davinci_map_io,
|
||||
.init_irq = davinci_dm646x_evm_irq_init,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = evm_init,
|
||||
MACHINE_END
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include <mach/dm644x.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/i2c.h>
|
||||
#include <mach/serial.h>
|
||||
#include <mach/mux.h>
|
||||
@@ -41,11 +42,6 @@
|
||||
#define NEUROS_OSD2_PHY_MASK 0x2
|
||||
#define NEUROS_OSD2_MDIO_FREQUENCY 2200000 /* PHY bus frequency */
|
||||
|
||||
#define DAVINCI_CFC_ATA_BASE 0x01C66000
|
||||
|
||||
#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e00000
|
||||
#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
|
||||
|
||||
#define LXT971_PHY_ID 0x001378e2
|
||||
#define LXT971_PHY_MASK 0xfffffff0
|
||||
|
||||
@@ -60,7 +56,7 @@
|
||||
|
||||
#define NAND_BLOCK_SIZE SZ_128K
|
||||
|
||||
struct mtd_partition davinci_ntosd2_nandflash_partition[] = {
|
||||
static struct mtd_partition davinci_ntosd2_nandflash_partition[] = {
|
||||
{
|
||||
/* UBL (a few copies) plus U-Boot */
|
||||
.name = "bootloader",
|
||||
@@ -98,12 +94,12 @@ static struct davinci_nand_pdata davinci_ntosd2_nandflash_data = {
|
||||
|
||||
static struct resource davinci_ntosd2_nandflash_resource[] = {
|
||||
{
|
||||
.start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_16M - 1,
|
||||
.start = DM644X_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DM644X_ASYNC_EMIF_DATA_CE0_BASE + SZ_16M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = DAVINCI_ASYNC_EMIF_CONTROL_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
.start = DM644X_ASYNC_EMIF_CONTROL_BASE,
|
||||
.end = DM644X_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
@@ -130,32 +126,6 @@ static struct platform_device davinci_fb_device = {
|
||||
.num_resources = 0,
|
||||
};
|
||||
|
||||
static struct resource ide_resources[] = {
|
||||
{
|
||||
.start = DAVINCI_CFC_ATA_BASE,
|
||||
.end = DAVINCI_CFC_ATA_BASE + 0x7ff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_IDE,
|
||||
.end = IRQ_IDE,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static u64 ide_dma_mask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct platform_device ide_dev = {
|
||||
.name = "palm_bk3710",
|
||||
.id = -1,
|
||||
.resource = ide_resources,
|
||||
.num_resources = ARRAY_SIZE(ide_resources),
|
||||
.dev = {
|
||||
.dma_mask = &ide_dma_mask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
};
|
||||
|
||||
static struct snd_platform_data dm644x_ntosd2_snd_data;
|
||||
|
||||
static struct gpio_led ntosd2_leds[] = {
|
||||
@@ -259,10 +229,7 @@ static __init void davinci_ntosd2_init(void)
|
||||
pr_warning("WARNING: both IDE and Flash are "
|
||||
"enabled, but they share AEMIF pins.\n"
|
||||
"\tDisable IDE for NAND/NOR support.\n");
|
||||
davinci_cfg_reg(DM644X_HPIEN_DISABLE);
|
||||
davinci_cfg_reg(DM644X_ATAEN);
|
||||
davinci_cfg_reg(DM644X_HDIREN);
|
||||
platform_device_register(&ide_dev);
|
||||
davinci_init_ide();
|
||||
} else if (HAS_NAND) {
|
||||
davinci_cfg_reg(DM644X_HPIEN_DISABLE);
|
||||
davinci_cfg_reg(DM644X_ATAEN_DISABLE);
|
||||
@@ -306,18 +273,13 @@ static __init void davinci_ntosd2_init(void)
|
||||
davinci_setup_mmc(0, &davinci_ntosd2_mmc_config);
|
||||
}
|
||||
|
||||
static __init void davinci_ntosd2_irq_init(void)
|
||||
{
|
||||
davinci_irq_init();
|
||||
}
|
||||
|
||||
MACHINE_START(NEUROS_OSD2, "Neuros OSD2")
|
||||
/* Maintainer: Neuros Technologies <neuros@groups.google.com> */
|
||||
.phys_io = IO_PHYS,
|
||||
.io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
|
||||
.boot_params = (DAVINCI_DDR_BASE + 0x100),
|
||||
.map_io = davinci_ntosd2_map_io,
|
||||
.init_irq = davinci_ntosd2_irq_init,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = davinci_ntosd2_init,
|
||||
MACHINE_END
|
||||
|
||||
@@ -45,10 +45,7 @@
|
||||
#define SFFSDR_PHY_MASK (0x2)
|
||||
#define SFFSDR_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
|
||||
|
||||
#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e00000
|
||||
#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
|
||||
|
||||
struct mtd_partition davinci_sffsdr_nandflash_partition[] = {
|
||||
static struct mtd_partition davinci_sffsdr_nandflash_partition[] = {
|
||||
/* U-Boot Environment: Block 0
|
||||
* UBL: Block 1
|
||||
* U-Boot: Blocks 6-7 (256 kb)
|
||||
@@ -76,12 +73,12 @@ static struct flash_platform_data davinci_sffsdr_nandflash_data = {
|
||||
|
||||
static struct resource davinci_sffsdr_nandflash_resource[] = {
|
||||
{
|
||||
.start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_16M - 1,
|
||||
.start = DM644X_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
.end = DM644X_ASYNC_EMIF_DATA_CE0_BASE + SZ_16M - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = DAVINCI_ASYNC_EMIF_CONTROL_BASE,
|
||||
.end = DAVINCI_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
.start = DM644X_ASYNC_EMIF_CONTROL_BASE,
|
||||
.end = DM644X_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
@@ -155,18 +152,13 @@ static __init void davinci_sffsdr_init(void)
|
||||
davinci_cfg_reg(DM644X_VLYNQWD);
|
||||
}
|
||||
|
||||
static __init void davinci_sffsdr_irq_init(void)
|
||||
{
|
||||
davinci_irq_init();
|
||||
}
|
||||
|
||||
MACHINE_START(SFFSDR, "Lyrtech SFFSDR")
|
||||
/* Maintainer: Hugo Villeneuve hugo.villeneuve@lyrtech.com */
|
||||
.phys_io = IO_PHYS,
|
||||
.io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
|
||||
.boot_params = (DAVINCI_DDR_BASE + 0x100),
|
||||
.map_io = davinci_sffsdr_map_io,
|
||||
.init_irq = davinci_sffsdr_irq_init,
|
||||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = davinci_sffsdr_init,
|
||||
MACHINE_END
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/i2c.h>
|
||||
|
||||
#include <mach/clock.h>
|
||||
#include <mach/cdce949.h>
|
||||
|
||||
#include "clock.h"
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <mach/hardware.h>
|
||||
|
||||
#include <mach/clock.h>
|
||||
#include <mach/psc.h>
|
||||
#include <mach/cputype.h>
|
||||
#include "clock.h"
|
||||
@@ -42,7 +43,8 @@ static void __clk_enable(struct clk *clk)
|
||||
if (clk->parent)
|
||||
__clk_enable(clk->parent);
|
||||
if (clk->usecount++ == 0 && (clk->flags & CLK_PSC))
|
||||
davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc, 1);
|
||||
davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc,
|
||||
PSC_STATE_ENABLE);
|
||||
}
|
||||
|
||||
static void __clk_disable(struct clk *clk)
|
||||
@@ -51,7 +53,9 @@ static void __clk_disable(struct clk *clk)
|
||||
return;
|
||||
if (--clk->usecount == 0 && !(clk->flags & CLK_PLL) &&
|
||||
(clk->flags & CLK_PSC))
|
||||
davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc, 0);
|
||||
davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc,
|
||||
(clk->flags & PSC_SWRSTDISABLE) ?
|
||||
PSC_STATE_SWRSTDISABLE : PSC_STATE_DISABLE);
|
||||
if (clk->parent)
|
||||
__clk_disable(clk->parent);
|
||||
}
|
||||
@@ -233,7 +237,10 @@ static int __init clk_disable_unused(void)
|
||||
continue;
|
||||
|
||||
pr_info("Clocks: disable unused %s\n", ck->name);
|
||||
davinci_psc_config(psc_domain(ck), ck->gpsc, ck->lpsc, 0);
|
||||
|
||||
davinci_psc_config(psc_domain(ck), ck->gpsc, ck->lpsc,
|
||||
(ck->flags & PSC_SWRSTDISABLE) ?
|
||||
PSC_STATE_SWRSTDISABLE : PSC_STATE_DISABLE);
|
||||
}
|
||||
spin_unlock_irq(&clockfw_lock);
|
||||
|
||||
@@ -272,7 +279,7 @@ static unsigned long clk_sysclk_recalc(struct clk *clk)
|
||||
|
||||
v = __raw_readl(pll->base + clk->div_reg);
|
||||
if (v & PLLDIV_EN) {
|
||||
plldiv = (v & PLLDIV_RATIO_MASK) + 1;
|
||||
plldiv = (v & pll->div_ratio_mask) + 1;
|
||||
if (plldiv)
|
||||
rate /= plldiv;
|
||||
}
|
||||
@@ -295,7 +302,6 @@ static unsigned long clk_pllclk_recalc(struct clk *clk)
|
||||
struct pll_data *pll = clk->pll_data;
|
||||
unsigned long rate = clk->rate;
|
||||
|
||||
pll->base = IO_ADDRESS(pll->phys_base);
|
||||
ctrl = __raw_readl(pll->base + PLLCTL);
|
||||
rate = pll->input_rate = clk->parent->rate;
|
||||
|
||||
@@ -312,7 +318,7 @@ static unsigned long clk_pllclk_recalc(struct clk *clk)
|
||||
if (pll->flags & PLL_HAS_PREDIV) {
|
||||
prediv = __raw_readl(pll->base + PREDIV);
|
||||
if (prediv & PLLDIV_EN)
|
||||
prediv = (prediv & PLLDIV_RATIO_MASK) + 1;
|
||||
prediv = (prediv & pll->div_ratio_mask) + 1;
|
||||
else
|
||||
prediv = 1;
|
||||
}
|
||||
@@ -324,7 +330,7 @@ static unsigned long clk_pllclk_recalc(struct clk *clk)
|
||||
if (pll->flags & PLL_HAS_POSTDIV) {
|
||||
postdiv = __raw_readl(pll->base + POSTDIV);
|
||||
if (postdiv & PLLDIV_EN)
|
||||
postdiv = (postdiv & PLLDIV_RATIO_MASK) + 1;
|
||||
postdiv = (postdiv & pll->div_ratio_mask) + 1;
|
||||
else
|
||||
postdiv = 1;
|
||||
}
|
||||
@@ -451,6 +457,18 @@ int __init davinci_clk_init(struct clk_lookup *clocks)
|
||||
clk->recalc = clk_leafclk_recalc;
|
||||
}
|
||||
|
||||
if (clk->pll_data) {
|
||||
struct pll_data *pll = clk->pll_data;
|
||||
|
||||
if (!pll->div_ratio_mask)
|
||||
pll->div_ratio_mask = PLLDIV_RATIO_MASK;
|
||||
|
||||
if (pll->phys_base && !pll->base) {
|
||||
pll->base = ioremap(pll->phys_base, SZ_4K);
|
||||
WARN_ON(!pll->base);
|
||||
}
|
||||
}
|
||||
|
||||
if (clk->recalc)
|
||||
clk->rate = clk->recalc(clk);
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ struct pll_data {
|
||||
u32 num;
|
||||
u32 flags;
|
||||
u32 input_rate;
|
||||
u32 div_ratio_mask;
|
||||
};
|
||||
#define PLL_HAS_PREDIV 0x01
|
||||
#define PLL_HAS_POSTDIV 0x02
|
||||
@@ -101,10 +102,11 @@ struct clk {
|
||||
|
||||
/* Clock flags: SoC-specific flags start at BIT(16) */
|
||||
#define ALWAYS_ENABLED BIT(1)
|
||||
#define CLK_PSC BIT(2)
|
||||
#define PSC_DSP BIT(3) /* PSC uses DSP domain, not ARM */
|
||||
#define CLK_PSC BIT(2)
|
||||
#define PSC_DSP BIT(3) /* PSC uses DSP domain, not ARM */
|
||||
#define CLK_PLL BIT(4) /* PLL-derived clock */
|
||||
#define PRE_PLL BIT(5) /* source is before PLL mult/div */
|
||||
#define PRE_PLL BIT(5) /* source is before PLL mult/div */
|
||||
#define PSC_SWRSTDISABLE BIT(6) /* Disable state is SwRstDisable */
|
||||
|
||||
#define CLK(dev, con, ck) \
|
||||
{ \
|
||||
@@ -118,6 +120,7 @@ int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv,
|
||||
unsigned int mult, unsigned int postdiv);
|
||||
|
||||
extern struct platform_device davinci_wdt_device;
|
||||
extern void davinci_watchdog_reset(struct platform_device *);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,26 +37,43 @@ void davinci_get_mac_addr(struct memory_accessor *mem_acc, void *context)
|
||||
pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr);
|
||||
}
|
||||
|
||||
static struct davinci_id * __init davinci_get_id(u32 jtag_id)
|
||||
static int __init davinci_init_id(struct davinci_soc_info *soc_info)
|
||||
{
|
||||
int i;
|
||||
struct davinci_id *dip;
|
||||
u8 variant = (jtag_id & 0xf0000000) >> 28;
|
||||
u16 part_no = (jtag_id & 0x0ffff000) >> 12;
|
||||
int i;
|
||||
struct davinci_id *dip;
|
||||
u8 variant;
|
||||
u16 part_no;
|
||||
void __iomem *base;
|
||||
|
||||
for (i = 0, dip = davinci_soc_info.ids; i < davinci_soc_info.ids_num;
|
||||
base = ioremap(soc_info->jtag_id_reg, SZ_4K);
|
||||
if (!base) {
|
||||
pr_err("Unable to map JTAG ID register\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
soc_info->jtag_id = __raw_readl(base);
|
||||
iounmap(base);
|
||||
|
||||
variant = (soc_info->jtag_id & 0xf0000000) >> 28;
|
||||
part_no = (soc_info->jtag_id & 0x0ffff000) >> 12;
|
||||
|
||||
for (i = 0, dip = soc_info->ids; i < soc_info->ids_num;
|
||||
i++, dip++)
|
||||
/* Don't care about the manufacturer right now */
|
||||
if ((dip->part_no == part_no) && (dip->variant == variant))
|
||||
return dip;
|
||||
if ((dip->part_no == part_no) && (dip->variant == variant)) {
|
||||
soc_info->cpu_id = dip->cpu_id;
|
||||
pr_info("DaVinci %s variant 0x%x\n", dip->name,
|
||||
dip->variant);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
pr_err("Unknown DaVinci JTAG ID 0x%x\n", soc_info->jtag_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
void __init davinci_common_init(struct davinci_soc_info *soc_info)
|
||||
{
|
||||
int ret;
|
||||
struct davinci_id *dip;
|
||||
|
||||
if (!soc_info) {
|
||||
ret = -EINVAL;
|
||||
@@ -77,22 +94,16 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info)
|
||||
local_flush_tlb_all();
|
||||
flush_cache_all();
|
||||
|
||||
if (!davinci_soc_info.reset)
|
||||
davinci_soc_info.reset = davinci_watchdog_reset;
|
||||
|
||||
/*
|
||||
* We want to check CPU revision early for cpu_is_xxxx() macros.
|
||||
* IO space mapping must be initialized before we can do that.
|
||||
*/
|
||||
davinci_soc_info.jtag_id = __raw_readl(davinci_soc_info.jtag_id_base);
|
||||
|
||||
dip = davinci_get_id(davinci_soc_info.jtag_id);
|
||||
if (!dip) {
|
||||
ret = -EINVAL;
|
||||
pr_err("Unknown DaVinci JTAG ID 0x%x\n",
|
||||
davinci_soc_info.jtag_id);
|
||||
ret = davinci_init_id(&davinci_soc_info);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
}
|
||||
|
||||
davinci_soc_info.cpu_id = dip->cpu_id;
|
||||
pr_info("DaVinci %s variant 0x%x\n", dip->name, dip->variant);
|
||||
|
||||
if (davinci_soc_info.cpu_clks) {
|
||||
ret = davinci_clk_init(davinci_soc_info.cpu_clks);
|
||||
@@ -101,8 +112,6 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info)
|
||||
goto err;
|
||||
}
|
||||
|
||||
davinci_intc_base = davinci_soc_info.intc_base;
|
||||
davinci_intc_type = davinci_soc_info.intc_type;
|
||||
return;
|
||||
|
||||
err:
|
||||
|
||||
@@ -13,18 +13,17 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/common.h>
|
||||
#include <mach/cp_intc.h>
|
||||
|
||||
static void __iomem *cp_intc_base;
|
||||
|
||||
static inline unsigned int cp_intc_read(unsigned offset)
|
||||
{
|
||||
return __raw_readl(cp_intc_base + offset);
|
||||
return __raw_readl(davinci_intc_base + offset);
|
||||
}
|
||||
|
||||
static inline void cp_intc_write(unsigned long value, unsigned offset)
|
||||
{
|
||||
__raw_writel(value, cp_intc_base + offset);
|
||||
__raw_writel(value, davinci_intc_base + offset);
|
||||
}
|
||||
|
||||
static void cp_intc_ack_irq(unsigned int irq)
|
||||
@@ -100,13 +99,18 @@ static struct irq_chip cp_intc_irq_chip = {
|
||||
.set_wake = cp_intc_set_wake,
|
||||
};
|
||||
|
||||
void __init cp_intc_init(void __iomem *base, unsigned short num_irq,
|
||||
u8 *irq_prio)
|
||||
void __init cp_intc_init(void)
|
||||
{
|
||||
unsigned long num_irq = davinci_soc_info.intc_irq_num;
|
||||
u8 *irq_prio = davinci_soc_info.intc_irq_prios;
|
||||
u32 *host_map = davinci_soc_info.intc_host_map;
|
||||
unsigned num_reg = BITS_TO_LONGS(num_irq);
|
||||
int i;
|
||||
|
||||
cp_intc_base = base;
|
||||
davinci_intc_type = DAVINCI_INTC_TYPE_CP_INTC;
|
||||
davinci_intc_base = ioremap(davinci_soc_info.intc_base, SZ_8K);
|
||||
if (WARN_ON(!davinci_intc_base))
|
||||
return;
|
||||
|
||||
cp_intc_write(0, CP_INTC_GLOBAL_ENABLE);
|
||||
|
||||
@@ -157,6 +161,10 @@ void __init cp_intc_init(void __iomem *base, unsigned short num_irq,
|
||||
cp_intc_write(0x0f0f0f0f, CP_INTC_CHAN_MAP(i));
|
||||
}
|
||||
|
||||
if (host_map)
|
||||
for (i = 0; host_map[i] != -1; i++)
|
||||
cp_intc_write(host_map[i], CP_INTC_HOST_MAP(i));
|
||||
|
||||
/* Set up genirq dispatching for cp_intc */
|
||||
for (i = 0; i < num_irq; i++) {
|
||||
set_irq_chip(i, &cp_intc_irq_chip);
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <mach/common.h>
|
||||
#include <mach/time.h>
|
||||
#include <mach/da8xx.h>
|
||||
#include <mach/gpio.h>
|
||||
|
||||
#include "clock.h"
|
||||
#include "mux.h"
|
||||
@@ -1126,10 +1127,7 @@ static struct map_desc da830_io_desc[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static void __iomem *da830_psc_bases[] = {
|
||||
IO_ADDRESS(DA8XX_PSC0_BASE),
|
||||
IO_ADDRESS(DA8XX_PSC1_BASE),
|
||||
};
|
||||
static u32 da830_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE };
|
||||
|
||||
/* Contents of JTAG ID register used to identify exact cpu type */
|
||||
static struct davinci_id da830_ids[] = {
|
||||
@@ -1158,14 +1156,14 @@ static struct davinci_id da830_ids[] = {
|
||||
|
||||
static struct davinci_timer_instance da830_timer_instance[2] = {
|
||||
{
|
||||
.base = IO_ADDRESS(DA8XX_TIMER64P0_BASE),
|
||||
.base = DA8XX_TIMER64P0_BASE,
|
||||
.bottom_irq = IRQ_DA8XX_TINT12_0,
|
||||
.top_irq = IRQ_DA8XX_TINT34_0,
|
||||
.cmp_off = DA830_CMP12_0,
|
||||
.cmp_irq = IRQ_DA830_T12CMPINT0_0,
|
||||
},
|
||||
{
|
||||
.base = IO_ADDRESS(DA8XX_TIMER64P1_BASE),
|
||||
.base = DA8XX_TIMER64P1_BASE,
|
||||
.bottom_irq = IRQ_DA8XX_TINT12_1,
|
||||
.top_irq = IRQ_DA8XX_TINT34_1,
|
||||
.cmp_off = DA830_CMP12_0,
|
||||
@@ -1187,34 +1185,33 @@ static struct davinci_timer_info da830_timer_info = {
|
||||
static struct davinci_soc_info davinci_soc_info_da830 = {
|
||||
.io_desc = da830_io_desc,
|
||||
.io_desc_num = ARRAY_SIZE(da830_io_desc),
|
||||
.jtag_id_reg = DA8XX_SYSCFG0_BASE + DA8XX_JTAG_ID_REG,
|
||||
.ids = da830_ids,
|
||||
.ids_num = ARRAY_SIZE(da830_ids),
|
||||
.cpu_clks = da830_clks,
|
||||
.psc_bases = da830_psc_bases,
|
||||
.psc_bases_num = ARRAY_SIZE(da830_psc_bases),
|
||||
.pinmux_base = DA8XX_SYSCFG0_BASE + 0x120,
|
||||
.pinmux_pins = da830_pins,
|
||||
.pinmux_pins_num = ARRAY_SIZE(da830_pins),
|
||||
.intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT,
|
||||
.intc_base = DA8XX_CP_INTC_BASE,
|
||||
.intc_type = DAVINCI_INTC_TYPE_CP_INTC,
|
||||
.intc_irq_prios = da830_default_priorities,
|
||||
.intc_irq_num = DA830_N_CP_INTC_IRQ,
|
||||
.timer_info = &da830_timer_info,
|
||||
.gpio_base = IO_ADDRESS(DA8XX_GPIO_BASE),
|
||||
.gpio_type = GPIO_TYPE_DAVINCI,
|
||||
.gpio_base = DA8XX_GPIO_BASE,
|
||||
.gpio_num = 128,
|
||||
.gpio_irq = IRQ_DA8XX_GPIO0,
|
||||
.serial_dev = &da8xx_serial_device,
|
||||
.emac_pdata = &da8xx_emac_pdata,
|
||||
.reset_device = &da8xx_wdt_device,
|
||||
};
|
||||
|
||||
void __init da830_init(void)
|
||||
{
|
||||
da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K);
|
||||
if (WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module"))
|
||||
return;
|
||||
|
||||
davinci_soc_info_da830.jtag_id_base =
|
||||
DA8XX_SYSCFG0_VIRT(DA8XX_JTAG_ID_REG);
|
||||
davinci_soc_info_da830.pinmux_base = DA8XX_SYSCFG0_VIRT(0x120);
|
||||
|
||||
davinci_common_init(&davinci_soc_info_da830);
|
||||
|
||||
da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K);
|
||||
WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module");
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <mach/da8xx.h>
|
||||
#include <mach/cpufreq.h>
|
||||
#include <mach/pm.h>
|
||||
#include <mach/gpio.h>
|
||||
|
||||
#include "clock.h"
|
||||
#include "mux.h"
|
||||
@@ -781,10 +782,7 @@ static struct map_desc da850_io_desc[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static void __iomem *da850_psc_bases[] = {
|
||||
IO_ADDRESS(DA8XX_PSC0_BASE),
|
||||
IO_ADDRESS(DA8XX_PSC1_BASE),
|
||||
};
|
||||
static u32 da850_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE };
|
||||
|
||||
/* Contents of JTAG ID register used to identify exact cpu type */
|
||||
static struct davinci_id da850_ids[] = {
|
||||
@@ -799,22 +797,22 @@ static struct davinci_id da850_ids[] = {
|
||||
|
||||
static struct davinci_timer_instance da850_timer_instance[4] = {
|
||||
{
|
||||
.base = IO_ADDRESS(DA8XX_TIMER64P0_BASE),
|
||||
.base = DA8XX_TIMER64P0_BASE,
|
||||
.bottom_irq = IRQ_DA8XX_TINT12_0,
|
||||
.top_irq = IRQ_DA8XX_TINT34_0,
|
||||
},
|
||||
{
|
||||
.base = IO_ADDRESS(DA8XX_TIMER64P1_BASE),
|
||||
.base = DA8XX_TIMER64P1_BASE,
|
||||
.bottom_irq = IRQ_DA8XX_TINT12_1,
|
||||
.top_irq = IRQ_DA8XX_TINT34_1,
|
||||
},
|
||||
{
|
||||
.base = IO_ADDRESS(DA850_TIMER64P2_BASE),
|
||||
.base = DA850_TIMER64P2_BASE,
|
||||
.bottom_irq = IRQ_DA850_TINT12_2,
|
||||
.top_irq = IRQ_DA850_TINT34_2,
|
||||
},
|
||||
{
|
||||
.base = IO_ADDRESS(DA850_TIMER64P3_BASE),
|
||||
.base = DA850_TIMER64P3_BASE,
|
||||
.bottom_irq = IRQ_DA850_TINT12_3,
|
||||
.top_irq = IRQ_DA850_TINT34_3,
|
||||
},
|
||||
@@ -1072,31 +1070,37 @@ no_ddrpll_mem:
|
||||
static struct davinci_soc_info davinci_soc_info_da850 = {
|
||||
.io_desc = da850_io_desc,
|
||||
.io_desc_num = ARRAY_SIZE(da850_io_desc),
|
||||
.jtag_id_reg = DA8XX_SYSCFG0_BASE + DA8XX_JTAG_ID_REG,
|
||||
.ids = da850_ids,
|
||||
.ids_num = ARRAY_SIZE(da850_ids),
|
||||
.cpu_clks = da850_clks,
|
||||
.psc_bases = da850_psc_bases,
|
||||
.psc_bases_num = ARRAY_SIZE(da850_psc_bases),
|
||||
.pinmux_base = DA8XX_SYSCFG0_BASE + 0x120,
|
||||
.pinmux_pins = da850_pins,
|
||||
.pinmux_pins_num = ARRAY_SIZE(da850_pins),
|
||||
.intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT,
|
||||
.intc_base = DA8XX_CP_INTC_BASE,
|
||||
.intc_type = DAVINCI_INTC_TYPE_CP_INTC,
|
||||
.intc_irq_prios = da850_default_priorities,
|
||||
.intc_irq_num = DA850_N_CP_INTC_IRQ,
|
||||
.timer_info = &da850_timer_info,
|
||||
.gpio_base = IO_ADDRESS(DA8XX_GPIO_BASE),
|
||||
.gpio_type = GPIO_TYPE_DAVINCI,
|
||||
.gpio_base = DA8XX_GPIO_BASE,
|
||||
.gpio_num = 144,
|
||||
.gpio_irq = IRQ_DA8XX_GPIO0,
|
||||
.serial_dev = &da8xx_serial_device,
|
||||
.emac_pdata = &da8xx_emac_pdata,
|
||||
.sram_dma = DA8XX_ARM_RAM_BASE,
|
||||
.sram_len = SZ_8K,
|
||||
.reset_device = &da8xx_wdt_device,
|
||||
};
|
||||
|
||||
void __init da850_init(void)
|
||||
{
|
||||
unsigned int v;
|
||||
|
||||
davinci_common_init(&davinci_soc_info_da850);
|
||||
|
||||
da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K);
|
||||
if (WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module"))
|
||||
return;
|
||||
@@ -1105,12 +1109,6 @@ void __init da850_init(void)
|
||||
if (WARN(!da8xx_syscfg1_base, "Unable to map syscfg1 module"))
|
||||
return;
|
||||
|
||||
davinci_soc_info_da850.jtag_id_base =
|
||||
DA8XX_SYSCFG0_VIRT(DA8XX_JTAG_ID_REG);
|
||||
davinci_soc_info_da850.pinmux_base = DA8XX_SYSCFG0_VIRT(0x120);
|
||||
|
||||
davinci_common_init(&davinci_soc_info_da850);
|
||||
|
||||
/*
|
||||
* Move the clock source of Async3 domain to PLL1 SYSCLK2.
|
||||
* This helps keeping the peripherals on this domain insulated
|
||||
|
||||
@@ -326,7 +326,7 @@ static struct resource da8xx_watchdog_resources[] = {
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device davinci_wdt_device = {
|
||||
struct platform_device da8xx_wdt_device = {
|
||||
.name = "watchdog",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(da8xx_watchdog_resources),
|
||||
@@ -335,7 +335,7 @@ struct platform_device davinci_wdt_device = {
|
||||
|
||||
int __init da8xx_register_watchdog(void)
|
||||
{
|
||||
return platform_device_register(&davinci_wdt_device);
|
||||
return platform_device_register(&da8xx_wdt_device);
|
||||
}
|
||||
|
||||
static struct resource da8xx_emac_resources[] = {
|
||||
@@ -584,10 +584,17 @@ static struct platform_device da8xx_rtc_device = {
|
||||
int da8xx_register_rtc(void)
|
||||
{
|
||||
int ret;
|
||||
void __iomem *base;
|
||||
|
||||
base = ioremap(DA8XX_RTC_BASE, SZ_4K);
|
||||
if (WARN_ON(!base))
|
||||
return -ENOMEM;
|
||||
|
||||
/* Unlock the rtc's registers */
|
||||
__raw_writel(0x83e70b13, IO_ADDRESS(DA8XX_RTC_BASE + 0x6c));
|
||||
__raw_writel(0x95a4f1e0, IO_ADDRESS(DA8XX_RTC_BASE + 0x70));
|
||||
__raw_writel(0x83e70b13, base + 0x6c);
|
||||
__raw_writel(0x95a4f1e0, base + 0x70);
|
||||
|
||||
iounmap(base);
|
||||
|
||||
ret = platform_device_register(&da8xx_rtc_device);
|
||||
if (!ret)
|
||||
|
||||
@@ -23,7 +23,10 @@
|
||||
#include <mach/mmc.h>
|
||||
#include <mach/time.h>
|
||||
|
||||
#include "clock.h"
|
||||
|
||||
#define DAVINCI_I2C_BASE 0x01C21000
|
||||
#define DAVINCI_ATA_BASE 0x01C66000
|
||||
#define DAVINCI_MMCSD0_BASE 0x01E10000
|
||||
#define DM355_MMCSD0_BASE 0x01E11000
|
||||
#define DM355_MMCSD1_BASE 0x01E00000
|
||||
@@ -58,6 +61,49 @@ void __init davinci_init_i2c(struct davinci_i2c_platform_data *pdata)
|
||||
(void) platform_device_register(&davinci_i2c_device);
|
||||
}
|
||||
|
||||
static struct resource ide_resources[] = {
|
||||
{
|
||||
.start = DAVINCI_ATA_BASE,
|
||||
.end = DAVINCI_ATA_BASE + 0x7ff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = IRQ_IDE,
|
||||
.end = IRQ_IDE,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static u64 ide_dma_mask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct platform_device ide_device = {
|
||||
.name = "palm_bk3710",
|
||||
.id = -1,
|
||||
.resource = ide_resources,
|
||||
.num_resources = ARRAY_SIZE(ide_resources),
|
||||
.dev = {
|
||||
.dma_mask = &ide_dma_mask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
};
|
||||
|
||||
void __init davinci_init_ide(void)
|
||||
{
|
||||
if (cpu_is_davinci_dm644x()) {
|
||||
davinci_cfg_reg(DM644X_HPIEN_DISABLE);
|
||||
davinci_cfg_reg(DM644X_ATAEN);
|
||||
davinci_cfg_reg(DM644X_HDIREN);
|
||||
} else if (cpu_is_davinci_dm646x()) {
|
||||
/* IRQ_DM646X_IDE is the same as IRQ_IDE */
|
||||
davinci_cfg_reg(DM646X_ATAEN);
|
||||
} else {
|
||||
WARN_ON(1);
|
||||
return;
|
||||
}
|
||||
|
||||
platform_device_register(&ide_device);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_MMC_DAVINCI) || defined(CONFIG_MMC_DAVINCI_MODULE)
|
||||
|
||||
static u64 mmcsd0_dma_mask = DMA_BIT_MASK(32);
|
||||
@@ -251,12 +297,12 @@ static void davinci_init_wdt(void)
|
||||
|
||||
struct davinci_timer_instance davinci_timer_instance[2] = {
|
||||
{
|
||||
.base = IO_ADDRESS(DAVINCI_TIMER0_BASE),
|
||||
.base = DAVINCI_TIMER0_BASE,
|
||||
.bottom_irq = IRQ_TINT0_TINT12,
|
||||
.top_irq = IRQ_TINT0_TINT34,
|
||||
},
|
||||
{
|
||||
.base = IO_ADDRESS(DAVINCI_TIMER1_BASE),
|
||||
.base = DAVINCI_TIMER1_BASE,
|
||||
.bottom_irq = IRQ_TINT1_TINT12,
|
||||
.top_irq = IRQ_TINT1_TINT34,
|
||||
},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user