Skip to content

Commit

Permalink
Merge branches 'devel-cleanup', 'devel-board', 'devel-early-init' and…
Browse files Browse the repository at this point in the history
… 'devel-ti816x' into omap-for-linus
  • Loading branch information
Tony Lindgren committed Feb 16, 2011
3 parents 85e2efb + 37cd4fe + e811d32 commit 9238b6d
Show file tree
Hide file tree
Showing 90 changed files with 665 additions and 386 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Common support
obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o
obj-y += clock.o clock_data.o opp_data.o
obj-y += clock.o clock_data.o opp_data.o reset.o

obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o

Expand Down
16 changes: 8 additions & 8 deletions arch/arm/mach-omap1/board-ams-delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static struct map_desc ams_delta_io_desc[] __initdata = {
}
};

static struct omap_lcd_config ams_delta_lcd_config __initdata = {
static struct omap_lcd_config ams_delta_lcd_config = {
.ctrl_name = "internal",
};

Expand All @@ -175,7 +175,7 @@ static struct omap_usb_config ams_delta_usb_config __initdata = {
.pins[0] = 2,
};

static struct omap_board_config_kernel ams_delta_config[] = {
static struct omap_board_config_kernel ams_delta_config[] __initdata = {
{ OMAP_TAG_LCD, &ams_delta_lcd_config },
};

Expand Down Expand Up @@ -208,14 +208,14 @@ static const struct matrix_keymap_data ams_delta_keymap_data = {
.keymap_size = ARRAY_SIZE(ams_delta_keymap),
};

static struct omap_kp_platform_data ams_delta_kp_data = {
static struct omap_kp_platform_data ams_delta_kp_data __initdata = {
.rows = 8,
.cols = 8,
.keymap_data = &ams_delta_keymap_data,
.delay = 9,
};

static struct platform_device ams_delta_kp_device = {
static struct platform_device ams_delta_kp_device __initdata = {
.name = "omap-keypad",
.id = -1,
.dev = {
Expand All @@ -225,12 +225,12 @@ static struct platform_device ams_delta_kp_device = {
.resource = ams_delta_kp_resources,
};

static struct platform_device ams_delta_lcd_device = {
static struct platform_device ams_delta_lcd_device __initdata = {
.name = "lcd_ams_delta",
.id = -1,
};

static struct platform_device ams_delta_led_device = {
static struct platform_device ams_delta_led_device __initdata = {
.name = "ams-delta-led",
.id = -1
};
Expand Down Expand Up @@ -259,15 +259,15 @@ static int ams_delta_camera_power(struct device *dev, int power)
#define ams_delta_camera_power NULL
#endif

static struct soc_camera_link __initdata ams_delta_iclink = {
static struct soc_camera_link ams_delta_iclink = {
.bus_id = 0, /* OMAP1 SoC camera bus */
.i2c_adapter_id = 1,
.board_info = &ams_delta_camera_board_info[0],
.module_name = "ov6650",
.power = ams_delta_camera_power,
};

static struct platform_device ams_delta_camera_device = {
static struct platform_device ams_delta_camera_device __initdata = {
.name = "soc-camera-pdrv",
.id = 0,
.dev = {
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap1/board-fsample.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,11 @@ static struct platform_device *devices[] __initdata = {
&lcd_device,
};

static struct omap_lcd_config fsample_lcd_config __initdata = {
static struct omap_lcd_config fsample_lcd_config = {
.ctrl_name = "internal",
};

static struct omap_board_config_kernel fsample_config[] = {
static struct omap_board_config_kernel fsample_config[] __initdata = {
{ OMAP_TAG_LCD, &fsample_lcd_config },
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-h2.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static int h2_nand_dev_ready(struct mtd_info *mtd)

static const char *h2_part_probes[] = { "cmdlinepart", NULL };

struct platform_nand_data h2_nand_platdata = {
static struct platform_nand_data h2_nand_platdata = {
.chip = {
.nr_chips = 1,
.chip_offset = 0,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-h3.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static int nand_dev_ready(struct mtd_info *mtd)

static const char *part_probes[] = { "cmdlinepart", NULL };

struct platform_nand_data nand_platdata = {
static struct platform_nand_data nand_platdata = {
.chip = {
.nr_chips = 1,
.chip_offset = 0,
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap1/board-htcherald.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static struct resource htcpld_resources[] = {
},
};

struct htcpld_chip_platform_data htcpld_chips[] = {
static struct htcpld_chip_platform_data htcpld_chips[] = {
[0] = {
.addr = 0x03,
.reset = 0x04,
Expand Down Expand Up @@ -366,7 +366,7 @@ struct htcpld_chip_platform_data htcpld_chips[] = {
},
};

struct htcpld_core_platform_data htcpld_pfdata = {
static struct htcpld_core_platform_data htcpld_pfdata = {
.int_reset_gpio_hi = HTCPLD_GPIO_INT_RESET_HI,
.int_reset_gpio_lo = HTCPLD_GPIO_INT_RESET_LO,
.i2c_adapter_id = 1,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/board-innovator.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static struct omap_mmc_platform_data mmc1_data = {

static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC];

void __init innovator_mmc_init(void)
static void __init innovator_mmc_init(void)
{
mmc_data[0] = &mmc1_data;
omap1_init_mmc(mmc_data, OMAP15XX_NR_MMC);
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-omap1/board-nokia770.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static struct mipid_platform_data nokia770_mipid_platform_data = {
.shutdown = mipid_shutdown,
};

static void mipid_dev_init(void)
static void __init mipid_dev_init(void)
{
const struct omap_lcd_config *conf;

Expand All @@ -126,7 +126,7 @@ static void mipid_dev_init(void)
}
}

static void ads7846_dev_init(void)
static void __init ads7846_dev_init(void)
{
if (gpio_request(ADS7846_PENDOWN_GPIO, "ADS7846 pendown") < 0)
printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
Expand Down Expand Up @@ -170,7 +170,7 @@ static struct hwa742_platform_data nokia770_hwa742_platform_data = {
.te_connected = 1,
};

static void hwa742_dev_init(void)
static void __init hwa742_dev_init(void)
{
clk_add_alias("hwa_sys_ck", NULL, "bclk", NULL);
omapfb_set_ctrl_platform_data(&nokia770_hwa742_platform_data);
Expand Down
13 changes: 0 additions & 13 deletions arch/arm/mach-omap1/board-palmte.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,6 @@ static struct spi_board_info palmte_spi_info[] __initdata = {
},
};

static void palmte_headphones_detect(void *data, int state)
{
if (state) {
/* Headphones connected, disable speaker */
gpio_set_value(PALMTE_SPEAKER_GPIO, 0);
printk(KERN_INFO "PM: speaker off\n");
} else {
/* Headphones unplugged, re-enable speaker */
gpio_set_value(PALMTE_SPEAKER_GPIO, 1);
printk(KERN_INFO "PM: speaker on\n");
}
}

static void __init palmte_misc_gpio_setup(void)
{
/* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */
Expand Down
107 changes: 60 additions & 47 deletions arch/arm/mach-omap1/board-voiceblue.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
#include <linux/smc91x.h>

#include <mach/hardware.h>
#include <mach/system.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>

#include <plat/board-voiceblue.h>
#include <plat/common.h>
#include <mach/gpio.h>
#include <plat/flash.h>
Expand Down Expand Up @@ -163,52 +165,6 @@ static void __init voiceblue_init_irq(void)
omap_init_irq();
}

static void __init voiceblue_init(void)
{
/* mux pins for uarts */
omap_cfg_reg(UART1_TX);
omap_cfg_reg(UART1_RTS);
omap_cfg_reg(UART2_TX);
omap_cfg_reg(UART2_RTS);
omap_cfg_reg(UART3_TX);
omap_cfg_reg(UART3_RX);

/* Watchdog */
gpio_request(0, "Watchdog");
/* smc91x reset */
gpio_request(7, "SMC91x reset");
gpio_direction_output(7, 1);
udelay(2); /* wait at least 100ns */
gpio_set_value(7, 0);
mdelay(50); /* 50ms until PHY ready */
/* smc91x interrupt pin */
gpio_request(8, "SMC91x irq");
/* 16C554 reset*/
gpio_request(6, "16C554 reset");
gpio_direction_output(6, 0);
/* 16C554 interrupt pins */
gpio_request(12, "16C554 irq");
gpio_request(13, "16C554 irq");
gpio_request(14, "16C554 irq");
gpio_request(15, "16C554 irq");
set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);

platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
omap_board_config = voiceblue_config;
omap_board_config_size = ARRAY_SIZE(voiceblue_config);
omap_serial_init();
omap1_usb_init(&voiceblue_usb_config);
omap_register_i2c_bus(1, 100, NULL, 0);

/* There is a good chance board is going up, so enable power LED
* (it is connected through invertor) */
omap_writeb(0x00, OMAP_LPG1_LCR);
omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */
}

static void __init voiceblue_map_io(void)
{
omap1_map_common_io();
Expand Down Expand Up @@ -275,8 +231,17 @@ void voiceblue_wdt_ping(void)
gpio_set_value(0, wdt_gpio_state);
}

void voiceblue_reset(void)
static void voiceblue_reset(char mode, const char *cmd)
{
/*
* Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
* "Global Software Reset Affects Traffic Controller Frequency".
*/
if (cpu_is_omap5912()) {
omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL);
omap_writew(0x8, ARM_RSTCT1);
}

set_bit(MACHINE_REBOOT, &machine_state);
voiceblue_wdt_enable();
while (1) ;
Expand All @@ -286,6 +251,54 @@ EXPORT_SYMBOL(voiceblue_wdt_enable);
EXPORT_SYMBOL(voiceblue_wdt_disable);
EXPORT_SYMBOL(voiceblue_wdt_ping);

static void __init voiceblue_init(void)
{
/* mux pins for uarts */
omap_cfg_reg(UART1_TX);
omap_cfg_reg(UART1_RTS);
omap_cfg_reg(UART2_TX);
omap_cfg_reg(UART2_RTS);
omap_cfg_reg(UART3_TX);
omap_cfg_reg(UART3_RX);

/* Watchdog */
gpio_request(0, "Watchdog");
/* smc91x reset */
gpio_request(7, "SMC91x reset");
gpio_direction_output(7, 1);
udelay(2); /* wait at least 100ns */
gpio_set_value(7, 0);
mdelay(50); /* 50ms until PHY ready */
/* smc91x interrupt pin */
gpio_request(8, "SMC91x irq");
/* 16C554 reset*/
gpio_request(6, "16C554 reset");
gpio_direction_output(6, 0);
/* 16C554 interrupt pins */
gpio_request(12, "16C554 irq");
gpio_request(13, "16C554 irq");
gpio_request(14, "16C554 irq");
gpio_request(15, "16C554 irq");
set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);

platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
omap_board_config = voiceblue_config;
omap_board_config_size = ARRAY_SIZE(voiceblue_config);
omap_serial_init();
omap1_usb_init(&voiceblue_usb_config);
omap_register_i2c_bus(1, 100, NULL, 0);

/* There is a good chance board is going up, so enable power LED
* (it is connected through invertor) */
omap_writeb(0x00, OMAP_LPG1_LCR);
omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */

arch_reset = voiceblue_reset;
}

MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
/* Maintainer: Ladislav Michl <michl@2n.cz> */
.boot_params = 0x10000100,
Expand Down
25 changes: 25 additions & 0 deletions arch/arm/mach-omap1/reset.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* OMAP1 reset support
*/
#include <linux/kernel.h>
#include <linux/io.h>

#include <mach/hardware.h>
#include <mach/system.h>
#include <plat/prcm.h>

void omap1_arch_reset(char mode, const char *cmd)
{
/*
* Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
* "Global Software Reset Affects Traffic Controller Frequency".
*/
if (cpu_is_omap5912()) {
omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL);
omap_writew(0x8, ARM_RSTCT1);
}

omap_writew(1, ARM_RSTCT1);
}

void (*arch_reset)(char, const char *) = omap1_arch_reset;
Loading

0 comments on commit 9238b6d

Please sign in to comment.