Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173355
b: refs/heads/master
c: 039c5ee
h: refs/heads/master
i:
  173353: 87c1260
  173351: 78a8593
v: v3
  • Loading branch information
Sudhakar Rajashekhara authored and Kevin Hilman committed Nov 25, 2009
1 parent 7cd0ece commit 695b810
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 53 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17fadd9a5edfeef15ea0e06822a25cc073d9ee02
refs/heads/master: 039c5ee3c901aded685fbbfbbea636f2f3ffc0e2
103 changes: 51 additions & 52 deletions trunk/arch/arm/mach-davinci/board-da850-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,58 @@ static struct platform_device da850_evm_nandflash_device = {
.resource = da850_evm_nandflash_resource,
};

static struct platform_device *da850_evm_devices[] __initdata = {
&da850_evm_nandflash_device,
&da850_evm_norflash_device,
};

#define DA8XX_AEMIF_CE2CFG_OFFSET 0x10
#define DA8XX_AEMIF_ASIZE_16BIT 0x1

static void __init da850_evm_init_nor(void)
{
void __iomem *aemif_addr;

aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K);

/* Configure data bus width of CS2 to 16 bit */
writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) |
DA8XX_AEMIF_ASIZE_16BIT,
aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET);

iounmap(aemif_addr);
}

static u32 ui_card_detected;
static void da850_evm_setup_nor_nand(void);

#if defined(CONFIG_MMC_DAVINCI) || \
defined(CONFIG_MMC_DAVINCI_MODULE)
#define HAS_MMC 1
#else
#define HAS_MMC 0
#endif

static void da850_evm_setup_nor_nand(void)
{
int ret = 0;

if (ui_card_detected & !HAS_MMC) {
ret = da8xx_pinmux_setup(da850_nand_pins);
if (ret)
pr_warning("da850_evm_init: nand mux setup failed: "
"%d\n", ret);

ret = da8xx_pinmux_setup(da850_nor_pins);
if (ret)
pr_warning("da850_evm_init: nor mux setup failed: %d\n",
ret);

da850_evm_init_nor();

platform_add_devices(da850_evm_devices,
ARRAY_SIZE(da850_evm_devices));
}
}

#ifdef CONFIG_DA850_UI_RMII
static inline void da850_evm_setup_emac_rmii(int rmii_sel)
Expand Down Expand Up @@ -249,11 +299,6 @@ static struct davinci_uart_config da850_evm_uart_config __initdata = {
.enabled_uarts = 0x7,
};

static struct platform_device *da850_evm_devices[] __initdata = {
&da850_evm_nandflash_device,
&da850_evm_norflash_device,
};

/* davinci da850 evm audio machine driver */
static u8 da850_iis_serializer_direction[] = {
INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
Expand Down Expand Up @@ -324,23 +369,6 @@ static int da850_lcd_hw_init(void)
return 0;
}

#define DA8XX_AEMIF_CE2CFG_OFFSET 0x10
#define DA8XX_AEMIF_ASIZE_16BIT 0x1

static void __init da850_evm_init_nor(void)
{
void __iomem *aemif_addr;

aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K);

/* Configure data bus width of CS2 to 16 bit */
writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) |
DA8XX_AEMIF_ASIZE_16BIT,
aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET);

iounmap(aemif_addr);
}

/* TPS65070 voltage regulator support */

/* 3.3V */
Expand Down Expand Up @@ -488,35 +516,6 @@ static int __init pmic_tps65070_init(void)
ARRAY_SIZE(da850evm_tps65070_info));
}

#if defined(CONFIG_MMC_DAVINCI) || \
defined(CONFIG_MMC_DAVINCI_MODULE)
#define HAS_MMC 1
#else
#define HAS_MMC 0
#endif

static void da850_evm_setup_nor_nand(void)
{
int ret = 0;

if (ui_card_detected & !HAS_MMC) {
ret = da8xx_pinmux_setup(da850_nand_pins);
if (ret)
pr_warning("da850_evm_init: nand mux setup failed: "
"%d\n", ret);

ret = da8xx_pinmux_setup(da850_nor_pins);
if (ret)
pr_warning("da850_evm_init: nor mux setup failed: %d\n",
ret);

da850_evm_init_nor();

platform_add_devices(da850_evm_devices,
ARRAY_SIZE(da850_evm_devices));
}
}

static const short da850_evm_lcdc_pins[] = {
DA850_GPIO2_8, DA850_GPIO2_15,
-1
Expand Down

0 comments on commit 695b810

Please sign in to comment.