diff options
| -rw-r--r-- | arch/arm/mach-davinci/board-dm646x-evm.c | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 8d0b0e01c59b..8c05343bb001 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
| @@ -40,53 +40,8 @@ | |||
| 40 | #include <mach/i2c.h> | 40 | #include <mach/i2c.h> |
| 41 | #include <mach/nand.h> | 41 | #include <mach/nand.h> |
| 42 | 42 | ||
| 43 | #if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \ | ||
| 44 | defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE) | ||
| 45 | #define HAS_ATA 1 | ||
| 46 | #else | ||
| 47 | #define HAS_ATA 0 | ||
| 48 | #endif | ||
| 49 | |||
| 50 | #define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x20008000 | ||
| 51 | #define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x42000000 | ||
| 52 | |||
| 53 | #define NAND_BLOCK_SIZE SZ_128K | 43 | #define NAND_BLOCK_SIZE SZ_128K |
| 54 | 44 | ||
| 55 | /* CPLD Register 0 bits to control ATA */ | ||
| 56 | #define DM646X_EVM_ATA_RST BIT(0) | ||
| 57 | #define DM646X_EVM_ATA_PWD BIT(1) | ||
| 58 | |||
| 59 | #define DM646X_EVM_PHY_MASK (0x2) | ||
| 60 | #define DM646X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ | ||
| 61 | |||
| 62 | #define VIDCLKCTL_OFFSET (DAVINCI_SYSTEM_MODULE_BASE + 0x38) | ||
| 63 | #define VSCLKDIS_OFFSET (DAVINCI_SYSTEM_MODULE_BASE + 0x6c) | ||
| 64 | #define VCH2CLK_MASK (BIT_MASK(10) | BIT_MASK(9) | BIT_MASK(8)) | ||
| 65 | #define VCH2CLK_SYSCLK8 (BIT(9)) | ||
| 66 | #define VCH2CLK_AUXCLK (BIT(9) | BIT(8)) | ||
| 67 | #define VCH3CLK_MASK (BIT_MASK(14) | BIT_MASK(13) | BIT_MASK(12)) | ||
| 68 | #define VCH3CLK_SYSCLK8 (BIT(13)) | ||
| 69 | #define VCH3CLK_AUXCLK (BIT(14) | BIT(13)) | ||
| 70 | |||
| 71 | #define VIDCH2CLK (BIT(10)) | ||
| 72 | #define VIDCH3CLK (BIT(11)) | ||
| 73 | #define VIDCH1CLK (BIT(4)) | ||
| 74 | #define TVP7002_INPUT (BIT(4)) | ||
| 75 | #define TVP5147_INPUT (~BIT(4)) | ||
| 76 | #define VPIF_INPUT_ONE_CHANNEL (BIT(5)) | ||
| 77 | #define VPIF_INPUT_TWO_CHANNEL (~BIT(5)) | ||
| 78 | #define TVP5147_CH0 "tvp514x-0" | ||
| 79 | #define TVP5147_CH1 "tvp514x-1" | ||
| 80 | |||
| 81 | static void __iomem *vpif_vidclkctl_reg; | ||
| 82 | static void __iomem *vpif_vsclkdis_reg; | ||
| 83 | /* spin lock for updating above registers */ | ||
| 84 | static spinlock_t vpif_reg_lock; | ||
| 85 | |||
| 86 | static struct davinci_uart_config uart_config __initdata = { | ||
| 87 | .enabled_uarts = (1 << 0), | ||
| 88 | }; | ||
| 89 | |||
| 90 | /* Note: We are setting first partition as 'bootloader' constituting UBL, U-Boot | 45 | /* Note: We are setting first partition as 'bootloader' constituting UBL, U-Boot |
| 91 | * and U-Boot environment this avoids dependency on any particular combination | 46 | * and U-Boot environment this avoids dependency on any particular combination |
| 92 | * of UBL, U-Boot or flashing tools etc. | 47 | * of UBL, U-Boot or flashing tools etc. |
| @@ -120,6 +75,9 @@ static struct davinci_nand_pdata davinci_nand_data = { | |||
| 120 | .options = 0, | 75 | .options = 0, |
| 121 | }; | 76 | }; |
| 122 | 77 | ||
| 78 | #define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x20008000 | ||
| 79 | #define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x42000000 | ||
| 80 | |||
| 123 | static struct resource davinci_nand_resources[] = { | 81 | static struct resource davinci_nand_resources[] = { |
| 124 | { | 82 | { |
| 125 | .start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE, | 83 | .start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE, |
| @@ -144,6 +102,17 @@ static struct platform_device davinci_nand_device = { | |||
| 144 | }, | 102 | }, |
| 145 | }; | 103 | }; |
| 146 | 104 | ||
| 105 | #if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \ | ||
| 106 | defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE) | ||
| 107 | #define HAS_ATA 1 | ||
| 108 | #else | ||
| 109 | #define HAS_ATA 0 | ||
| 110 | #endif | ||
| 111 | |||
| 112 | /* CPLD Register 0 bits to control ATA */ | ||
| 113 | #define DM646X_EVM_ATA_RST BIT(0) | ||
| 114 | #define DM646X_EVM_ATA_PWD BIT(1) | ||
| 115 | |||
| 147 | /* CPLD Register 0 Client: used for I/O Control */ | 116 | /* CPLD Register 0 Client: used for I/O Control */ |
| 148 | static int cpld_reg0_probe(struct i2c_client *client, | 117 | static int cpld_reg0_probe(struct i2c_client *client, |
| 149 | const struct i2c_device_id *id) | 118 | const struct i2c_device_id *id) |
| @@ -424,6 +393,30 @@ static struct davinci_i2c_platform_data i2c_pdata = { | |||
| 424 | .bus_delay = 0 /* usec */, | 393 | .bus_delay = 0 /* usec */, |
| 425 | }; | 394 | }; |
| 426 | 395 | ||
| 396 | #define VIDCLKCTL_OFFSET (DAVINCI_SYSTEM_MODULE_BASE + 0x38) | ||
| 397 | #define VSCLKDIS_OFFSET (DAVINCI_SYSTEM_MODULE_BASE + 0x6c) | ||
| 398 | #define VCH2CLK_MASK (BIT_MASK(10) | BIT_MASK(9) | BIT_MASK(8)) | ||
| 399 | #define VCH2CLK_SYSCLK8 (BIT(9)) | ||
| 400 | #define VCH2CLK_AUXCLK (BIT(9) | BIT(8)) | ||
| 401 | #define VCH3CLK_MASK (BIT_MASK(14) | BIT_MASK(13) | BIT_MASK(12)) | ||
| 402 | #define VCH3CLK_SYSCLK8 (BIT(13)) | ||
| 403 | #define VCH3CLK_AUXCLK (BIT(14) | BIT(13)) | ||
| 404 | |||
| 405 | #define VIDCH2CLK (BIT(10)) | ||
| 406 | #define VIDCH3CLK (BIT(11)) | ||
| 407 | #define VIDCH1CLK (BIT(4)) | ||
| 408 | #define TVP7002_INPUT (BIT(4)) | ||
| 409 | #define TVP5147_INPUT (~BIT(4)) | ||
| 410 | #define VPIF_INPUT_ONE_CHANNEL (BIT(5)) | ||
| 411 | #define VPIF_INPUT_TWO_CHANNEL (~BIT(5)) | ||
| 412 | #define TVP5147_CH0 "tvp514x-0" | ||
| 413 | #define TVP5147_CH1 "tvp514x-1" | ||
| 414 | |||
| 415 | static void __iomem *vpif_vidclkctl_reg; | ||
| 416 | static void __iomem *vpif_vsclkdis_reg; | ||
| 417 | /* spin lock for updating above registers */ | ||
| 418 | static spinlock_t vpif_reg_lock; | ||
| 419 | |||
| 427 | static int set_vpif_clock(int mux_mode, int hd) | 420 | static int set_vpif_clock(int mux_mode, int hd) |
| 428 | { | 421 | { |
| 429 | unsigned long flags; | 422 | unsigned long flags; |
| @@ -690,6 +683,13 @@ static void __init davinci_map_io(void) | |||
| 690 | dm646x_init(); | 683 | dm646x_init(); |
| 691 | } | 684 | } |
| 692 | 685 | ||
| 686 | static struct davinci_uart_config uart_config __initdata = { | ||
| 687 | .enabled_uarts = (1 << 0), | ||
| 688 | }; | ||
| 689 | |||
| 690 | #define DM646X_EVM_PHY_MASK (0x2) | ||
| 691 | #define DM646X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ | ||
| 692 | |||
| 693 | static __init void evm_init(void) | 693 | static __init void evm_init(void) |
| 694 | { | 694 | { |
| 695 | struct davinci_soc_info *soc_info = &davinci_soc_info; | 695 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
