diff options
| author | mattis fjallstrom <mattis@acm.org> | 2015-05-18 13:36:24 -0700 |
|---|---|---|
| committer | mattis fjallstrom <mattis@acm.org> | 2015-05-18 13:36:24 -0700 |
| commit | 4053a41d4a8e7b725b894b4648e593ebf6e0b95a (patch) | |
| tree | e7e60af96fe2a670ea3b149628b85171685fb570 | |
| parent | a8b4c3e436848b4d85b7189785912e6e63ec3451 (diff) | |
| download | olio-linux-3.10-4053a41d4a8e7b725b894b4648e593ebf6e0b95a.tar.xz olio-linux-3.10-4053a41d4a8e7b725b894b4648e593ebf6e0b95a.zip | |
Power management updates: Device tree changes, serial port structure settings in board file, sdram register settings, fixed DT related bug in regulator core, added suspend / resume functions to the display (panel-ili9342.c).
Change-Id: I9e2baf38b956700877fac424ca67f42bafdc09c3
| -rw-r--r-- | arch/arm/boot/dts/omap3.dtsi | 36 | ||||
| -rw-r--r-- | arch/arm/boot/dts/omap36xx.dtsi | 14 | ||||
| -rw-r--r-- | arch/arm/boot/dts/omap3_h1.dts | 3 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3h1.c | 274 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/sdram-micron-mt29c4g48.h | 63 | ||||
| -rw-r--r-- | drivers/regulator/core.c | 13 | ||||
| -rw-r--r-- | drivers/video/omap2/displays/panel-ili9342.c | 8 |
7 files changed, 292 insertions, 119 deletions
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index a4767484a53..4d45679361b 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -227,26 +227,24 @@ /* <&omap3_pmx_core 26 0xd9 1>, */ /* <&omap3_pmx_core 28 0xc1 4>; */ }; - - /* - uart1: serial@4806a000 { - compatible = "ti,omap3-uart"; - ti,hwmods = "uart1"; - clock-frequency = <48000000>; - }; + /* uart1: serial@4806a000 { */ + /* compatible = "ti,omap3-uart"; */ + /* ti,hwmods = "uart1"; */ + /* clock-frequency = <48000000>; */ + /* }; */ - uart2: serial@4806c000 { - compatible = "ti,omap3-uart"; - ti,hwmods = "uart2"; - clock-frequency = <48000000>; - }; + /* uart2: serial@4806c000 { */ + /* compatible = "ti,omap3-uart"; */ + /* ti,hwmods = "uart2"; */ + /* clock-frequency = <48000000>; */ + /* }; */ - uart3: serial@49020000 { - compatible = "ti,omap3-uart"; - ti,hwmods = "uart3"; - clock-frequency = <48000000>; - };*/ + /* uart3: serial@49020000 { */ + /* compatible = "ti,omap3-uart"; */ + /* ti,hwmods = "uart3"; */ + /* clock-frequency = <48000000>; */ + /* }; */ /* i2c1: i2c@48070000 { @@ -583,8 +581,8 @@ };*/ glbl_prm: glbl_prm@48307250 { - /* - * disabled by default. becasue two required + /* + * disabled by default. because two required * values should be defined in board file */ status = "disabled"; diff --git a/arch/arm/boot/dts/omap36xx.dtsi b/arch/arm/boot/dts/omap36xx.dtsi index 34392dbe1bd..2a25174167c 100644 --- a/arch/arm/boot/dts/omap36xx.dtsi +++ b/arch/arm/boot/dts/omap36xx.dtsi @@ -29,11 +29,11 @@ /* }; */ }; - /* ocp { */ - /* uart4: serial@49042000 { */ - /* compatible = "ti,omap3-uart"; */ - /* ti,hwmods = "uart4"; */ - /* clock-frequency = <48000000>; */ - /* }; */ - /* }; */ + /* ocp { */ + /* uart4: serial@49042000 { */ + /* compatible = "ti,omap3-uart"; */ + /* ti,hwmods = "uart4"; */ + /* clock-frequency = <48000000>; */ + /* }; */ + /* }; */ }; diff --git a/arch/arm/boot/dts/omap3_h1.dts b/arch/arm/boot/dts/omap3_h1.dts index cf07bae80c9..13a34e53ac7 100644 --- a/arch/arm/boot/dts/omap3_h1.dts +++ b/arch/arm/boot/dts/omap3_h1.dts @@ -33,8 +33,6 @@ }; }; - - &vc { ti,i2c-high-speed; ti,i2c-pad-load = <3>; @@ -47,7 +45,6 @@ }; }; - &glbl_prm { status = "ok"; sys_clk = "osc_sys_ck"; diff --git a/arch/arm/mach-omap2/board-omap3h1.c b/arch/arm/mach-omap2/board-omap3h1.c index 4e01a52f9b5..fa9164322c3 100644 --- a/arch/arm/mach-omap2/board-omap3h1.c +++ b/arch/arm/mach-omap2/board-omap3h1.c @@ -51,6 +51,8 @@ #include <video/omapdss.h> #include <video/omap-panel-data.h> #include <linux/platform_data/mtd-nand-omap2.h> +#include <linux/platform_data/serial-omap.h> +#include <linux/interrupt.h> #include <linux/of_irq.h> #include <linux/of_platform.h> @@ -66,6 +68,8 @@ #include "common-board-devices.h" #include "board-omap3h1.h" +#include "sdram-micron-mt29c4g48.h" + #define NAND_CS 0 #define MPUIRQ_GPIO 31 @@ -74,6 +78,10 @@ #define USB_IRQ 124 #define USB_ON_ETK_D7 21 +#define DEFAULT_RXDMA_POLLRATE 1 /* RX DMA polling rate (us) */ +#define DEFAULT_RXDMA_BUFSIZE 4096 /* RX DMA buffer size */ +#define DEFAULT_RXDMA_TIMEOUT (3 * HZ)/* RX DMA timeout (jiffies) */ + #if defined(CONFIG_MACH_OMAP3_H1_DVT1) || defined(CONFIG_MACH_OMAP3_H1_DVT2) #define LCD_RESET_GPIO 94 #else @@ -207,21 +215,24 @@ static struct mxt_platform_data mxt_data = { .irqflags = IRQF_TRIGGER_FALLING, }; +/* static struct platform_device bcm20702_bluetooth_device = { .name = "bcm20702_bluetooth", .id = -1, }; +*/ static struct platform_device omap3h1_dmic_codec = { .name = "dmic-codec", .id = -1, }; - /* --------------------------------------------------------------------------- */ /* USB settings */ + + static struct omap_musb_board_data musb_board_data = { .interface_type = MUSB_INTERFACE_ULPI, .mode = MUSB_OTG, @@ -255,7 +266,7 @@ static struct platform_device nop_phy_device = { static struct regulator_init_data omap3h1_vbat_data = { .constraints.always_on = true, - .constraints.valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, + .constraints.valid_modes_mask = REGULATOR_MODE_NORMAL, .constraints.valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }; @@ -279,13 +290,12 @@ static struct platform_device omap3h1_vbat = { static struct regulator_init_data tps65910_dummy = { .supply_regulator = "VBAT", - .constraints.always_on = true, + .constraints.always_on = false, .constraints.valid_ops_mask = REGULATOR_CHANGE_STATUS, }; /* --------------------------------------------------------------------------- */ -/* This one is required for the display to work ... makes no sense, but there - * you are. +/* This one is required for the display to work. */ static struct regulator_consumer_supply tps65910_touch3_supply[] = { @@ -343,8 +353,18 @@ static struct regulator_init_data tps65910_vibrator = { .max_uV = 3300000, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_MODE, - .always_on = true, + .always_on = false, .apply_uV = true, + + .state_mem = { + .disabled = 1, + }, + .state_disk = { + .disabled = 1, + }, + .state_standby = { + .disabled = 1, + }, }, .num_consumer_supplies = ARRAY_SIZE(tps65910_vibrator_supply), .consumer_supplies = tps65910_vibrator_supply, @@ -371,7 +391,7 @@ static struct regulator_init_data tps65910_3v3 = { .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, - .always_on = true, + .always_on = false, .apply_uV = true, .state_mem = { @@ -393,7 +413,7 @@ static struct regulator_init_data tps65910_3v3 = { * USB also depends on this, so if you want to transfer files it has to be * always on. * NAND flash and UART3 (which we don't use) requires it - * as well. + * as well. And the i2c bus, and lots of other stuff. * * Setting always_on to "false" resulted in almost no power savings, at * least in the current setting. @@ -410,34 +430,16 @@ static struct regulator_init_data tps65910_1v8 = { .max_uV = 1800000, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, - .always_on = true, + .always_on = false, .apply_uV = true, - - .state_mem = { - .uV = 0, - .mode = REGULATOR_MODE_STANDBY, - .enabled = 1, - }, - .state_disk = { - .uV = 0, - .mode = REGULATOR_MODE_STANDBY, - .enabled = 1, - }, - .state_standby = { - .uV = 0, - .mode = REGULATOR_MODE_STANDBY, - .enabled = 1, - }, - }, .num_consumer_supplies = ARRAY_SIZE(tps65910_1v8_supply), .consumer_supplies = tps65910_1v8_supply, }; /* --------------------------------------------------------------------------- */ -/* This isn't actually used, but the wires are required by the processor / - * PMIC. I should be able to set it to constant standby mode (and maybe - * also some sort of off setting?). +/* There's no driver explicitly using this one, but it goes to VDDA_DPLL_PER + * on the OMAP chip. So it's used internally by the DPLL devices in PER, I think. */ static struct regulator_consumer_supply tps65910_vpll_supply[] = { @@ -460,12 +462,7 @@ static struct regulator_init_data tps65910_vpll = { /* --------------------------------------------------------------------------- */ -/* If this one isn't "always on", the display doesn't come up right. - * Maybe the power code should be in the panel part of the driver, rather than - * the SPI? But then again, the SPI part is what needs a power cycle ... tricky! - * - * OK this is weird. The other touch rail (3.3) seems to be gating the display. - * What's going on? Maybe the spi is on the wrong rail? +/* Touch power supply part 2. */ static struct regulator_consumer_supply tps65910_touch_supply[] = { @@ -483,15 +480,17 @@ static struct regulator_init_data tps65910_touch = { .apply_uV = true, .state_mem = { - .uV = 0, + .uV = 1, .mode = REGULATOR_MODE_STANDBY, .disabled = 1, }, .state_disk = { + .uV = 1, .mode = REGULATOR_MODE_STANDBY, .disabled = 1, }, .state_standby = { + .uV = 1, .mode = REGULATOR_MODE_STANDBY, .disabled = 1, }, @@ -507,6 +506,9 @@ static struct regulator_init_data tps65910_touch = { /* This one only works if 'always_on' is set to true. Do I need to do something * special otherwise to turn it on? Maybe the driver doesn't enable it. + * + * The accelerometer driver isn't using regulators properly, hence this needs to + * be always on. */ static struct regulator_consumer_supply tps65910_accel_supply[] = { @@ -524,12 +526,18 @@ static struct regulator_init_data tps65910_accel = { .apply_uV = true, .state_mem = { + .uV = 1, + .mode = REGULATOR_MODE_STANDBY, .disabled = 1, }, .state_disk = { + .uV = 1, + .mode = REGULATOR_MODE_STANDBY, .disabled = 1, }, .state_standby = { + .uV = 1, + .mode = REGULATOR_MODE_STANDBY, .disabled = 1, }, }, @@ -538,8 +546,7 @@ static struct regulator_init_data tps65910_accel = { }; /* --------------------------------------------------------------------------- */ -/* This one isn't pulled on by the CPU ... wrong supply name ? - * Also, the TWL code does NOT have always on set. +/* Supplies the MPU PD and friends. */ static struct regulator_consumer_supply tps65910_vdd1_supply[] = { @@ -552,9 +559,25 @@ static struct regulator_init_data tps65910_vdd1 = { .name = "vdd_mpu_iva", .min_uV = 900000, .max_uV = 1350000, - .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_IDLE, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE, - .always_on = true, + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + .always_on = false, + + .state_mem = { + .uV = 1, + .mode = REGULATOR_MODE_STANDBY, + .disabled = 1, + }, + .state_disk = { + .uV = 1, + .mode = REGULATOR_MODE_STANDBY, + .disabled = 1, + }, + .state_standby = { + .uV = 1, + .mode = REGULATOR_MODE_STANDBY, + .disabled = 1, + }, }, .num_consumer_supplies = ARRAY_SIZE(tps65910_vdd1_supply), @@ -566,7 +589,7 @@ static struct regulator_init_data tps65910_vdd1 = { */ static struct regulator_consumer_supply tps65910_vdd2_supply[] = { - REGULATOR_SUPPLY("vcc", "l3_main.0"), + REGULATOR_SUPPLY("vdd_core", "l3_main.0"), }; static struct regulator_init_data tps65910_vdd2 = { @@ -575,11 +598,27 @@ static struct regulator_init_data tps65910_vdd2 = { .name = "vdd_core", .min_uV = 900000, .max_uV = 1200000, - .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_IDLE, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE, - .always_on = true, - }, + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + .always_on = false, + .state_mem = { + .uV = 1, + .mode = REGULATOR_MODE_STANDBY, + .disabled = 1, + }, + .state_disk = { + .uV = 1, + .mode = REGULATOR_MODE_STANDBY, + .disabled = 1, + }, + .state_standby = { + .uV = 1, + .mode = REGULATOR_MODE_STANDBY, + .disabled = 1, + }, + }, + .num_consumer_supplies = ARRAY_SIZE(tps65910_vdd2_supply), .consumer_supplies = tps65910_vdd2_supply, }; @@ -594,13 +633,13 @@ static struct regulator_init_data tps65910_vdd2 = { * boot, touch not working when up). */ -/* +/* static struct tps65910_sleep_keepon_data olio_slp_keepon = { - .therm_keepon = 1, - .clkout32k_keepon = 1, + .therm_keepon = 0, + .clkout32k_keepon = 0, .i2chs_keepon = 1, -}; - */ + };*/ + static struct tps65910_board omap3h1_tps65910_pdata = { @@ -721,31 +760,31 @@ static struct i2c_board_info __initdata omap3h1_i2c1_board_info[] = { }; static struct i2c_board_info __initdata omap3h1_i2c2_board_info[] = { #endif - { - I2C_BOARD_INFO("mpu6515", 0x68), - // This is needed for the interrupt wake. IH_GPIO_BASE changed in 3.10 - // .irq = (IH_GPIO_BASE + MPUIRQ_GPIO), - .platform_data = &mpu_data, - }, - { - /* Backlight */ - I2C_BOARD_INFO("lm3530-led", 0x38), - .platform_data = &omap3h1_backlight_platform_data, - }, - { - I2C_BOARD_INFO("mXT224", 0x4a), - .platform_data = &mxt_data, - }, - { - I2C_BOARD_INFO("cm3391", 0x10), - }, + { + I2C_BOARD_INFO("mpu6515", 0x68), + // This is needed for the interrupt wake. IH_GPIO_BASE changed in 3.10 + // .irq = (IH_GPIO_BASE + MPUIRQ_GPIO), + .platform_data = &mpu_data, + }, + { + /* Backlight */ + I2C_BOARD_INFO("lm3530-led", 0x38), + .platform_data = &omap3h1_backlight_platform_data, + }, + { + I2C_BOARD_INFO("mXT224", 0x4a), + .platform_data = &mxt_data, + }, + { + I2C_BOARD_INFO("cm3391", 0x10), + }, #ifdef CONFIG_MACH_OMAP3_H1_EVT1 }; static struct i2c_board_info __initdata omap3h1_i2c3_board_info[] = { #endif - { - I2C_BOARD_INFO("bq274xx", 0x55), - }, + { + I2C_BOARD_INFO("bq274xx", 0x55), + }, }; #ifdef ONLY_KEEPING_THIS_STUFF_FOR_NOSTALGIC_REASONS @@ -757,7 +796,6 @@ static struct i2c_board_info __initdata omap3h1_i2c3_board_info[] = { * That PID will then be used when waking the system up. */ - struct dentry * pidfile; #define SIG_OLIO_WAKE 44 // we choose 44 as our signal number (real-time signals are in the range of 33 to 64) @@ -884,7 +922,7 @@ static irqreturn_t acc_irq_handler_thr(int irq, void * omap3h1_d) { */ send_wake_signal(); - wake_lock_timeout (&acc_wake.lock, msecs_to_jiffies (2 * OLIO_ONE_SECOND)); + wake_lock_timeout (&acc_wake.lock, msecs_to_jiffies (20 * OLIO_ONE_SECOND)); previous_double = now; previous = 0; @@ -910,7 +948,9 @@ static int __init omap3_acc_irq_init (int irq, void * dev_id) { irq_set_irq_wake(irq, 1); if (request_threaded_irq (irq, acc_irq_handler, - acc_irq_handler_thr, 0x81, "acc_wake", + acc_irq_handler_thr, + IRQF_SHARED | IRQF_TRIGGER_RISING, + "acc_wake", dev_id)) { printk (KERN_DEBUG "Couldn't register handler for accelerometer IRQ\n"); } @@ -934,6 +974,69 @@ static int __init omap3_wake_init (void) { #endif /* ONLY_KEEPING_THIS_STUFF_FOR_NOSTALGIC_REASONS */ + +/*************************************************************************** + * omap_uart data + */ + +/* Some notes: + .dma_enabled = false, + .dma_rx_buf_size = DEFAULT_RXDMA_BUFSIZE, + .dma_rx_poll_rate = DEFAULT_RXDMA_POLLRATE, + .dma_rx_timeout = DEFAULT_RXDMA_TIMEOUT, + .autosuspend_timeout = DEFAULT_AUTOSUSPEND_DELAY, ( -1 or X ms. ) + + .wakelock_timeout - for minnow, this is 150 (BT) or 50 (M4 debug). + Can be left out. + + .DTR_* -> can be left out. I can't find anyone using it. + + int DTR_gpio; + int DTR_inverted; + int DTR_present; + bool wakeup_capable; + + bool open_close_pm; - Minnow uses this for c55 only + unsigned int rx_trig; Minnow, BT & debug only +*/ + +static struct omap_uart_port_info omap_uart_ports[] = { + { + .dma_enabled = false, /* To specify DMA Mode */ + .dma_rx_buf_size = DEFAULT_RXDMA_BUFSIZE, + .dma_rx_timeout = DEFAULT_RXDMA_TIMEOUT, + .dma_rx_poll_rate = DEFAULT_RXDMA_POLLRATE, + .autosuspend_timeout = 5000, + .wakeup_capable = false, + }, + { + .dma_enabled = false, /* To specify DMA Mode */ + .dma_rx_buf_size = DEFAULT_RXDMA_BUFSIZE, + .dma_rx_timeout = DEFAULT_RXDMA_TIMEOUT, + .dma_rx_poll_rate = DEFAULT_RXDMA_POLLRATE, + .autosuspend_timeout = 5000, + .wakeup_capable = false, + }, + { + .dma_enabled = false, /* To specify DMA Mode */ + .dma_rx_buf_size = DEFAULT_RXDMA_BUFSIZE, + .dma_rx_timeout = DEFAULT_RXDMA_TIMEOUT, + .dma_rx_poll_rate = DEFAULT_RXDMA_POLLRATE, + .autosuspend_timeout = -1, + .wakelock_timeout = 10000, + .wakeup_capable = true, + }, + { + .dma_enabled = false, /* To specify DMA Mode */ + .dma_rx_buf_size = DEFAULT_RXDMA_BUFSIZE, + .dma_rx_timeout = DEFAULT_RXDMA_TIMEOUT, + .dma_rx_poll_rate = DEFAULT_RXDMA_POLLRATE, + .autosuspend_timeout = 5000, + .wakeup_capable = false, + }, +}; + + /*************************************************************************** * DEVICE TREE STUFF * @@ -1000,7 +1103,7 @@ static int __init omap3_h1_i2c_init(void) static struct platform_device *omap3h1_devices[] __initdata = { &omap3h1_vbat, - &bcm20702_bluetooth_device, + // &bcm20702_bluetooth_device, &nop_phy_device, &omap3h1_dmic_codec, }; @@ -1065,7 +1168,7 @@ static struct omap_board_mux board_mux[] __initdata = { OMAP3_MUX(JTAG_EMU1, (OMAP_MUX_MODE4 | OMAP_PIN_INPUT | OMAP_PIN_OFF_WAKEUPENABLE)), - + /* USB on */ OMAP3_MUX(ETK_D7, (OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT)), @@ -1076,8 +1179,6 @@ static struct omap_board_mux board_mux[] __initdata = { }; #endif - - static void __init omap3_h1_init(void) { /* Read what we can from the device tree */ @@ -1088,7 +1189,7 @@ static void __init omap3_h1_init(void) ARRAY_SIZE(omap3h1_nand_partitions), NAND_CS, NAND_BUSWIDTH_16, NULL); - omap_sdrc_init(NULL, NULL); + omap_sdrc_init(mt29c4g48_sdrc_params, mt29c4g48_sdrc_params); omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); @@ -1101,7 +1202,7 @@ static void __init omap3_h1_init(void) omap3h1_spi_init(); - omap_serial_init(); + omap_serial_board_init(omap_uart_ports); omap_display_init(&omap3h1_dss_data); @@ -1109,15 +1210,22 @@ static void __init omap3_h1_init(void) usb_musb_init(&musb_board_data); + /* #ifdef ONLY_KEEPING_THIS_STUFF_FOR_NOSTALGIC_REASONS */ + /* For handling interrupts from the accelerometer */ /* previous = jiffies; */ /* Init the code that handles wake ups */ - /* omap3_wake_init(); */ + /* + omap3_wake_init(); + + omap3_acc_irq_init(omap3h1_i2c2_board_info[0].irq, (void *) &omap3h1_devices); + */ + + /* #endif ONLY_KEEPING_THIS_STUFF_FOR_NOSTALGIC_REASONS*/ - /* omap3_acc_irq_init(omap3h1_i2c2_board_info[0].irq, (void *) &omap3h1_devices); */ } static const char *omap3_h1_boards_compat[] __initdata = { diff --git a/arch/arm/mach-omap2/sdram-micron-mt29c4g48.h b/arch/arm/mach-omap2/sdram-micron-mt29c4g48.h new file mode 100644 index 00000000000..aa012b090f9 --- /dev/null +++ b/arch/arm/mach-omap2/sdram-micron-mt29c4g48.h @@ -0,0 +1,63 @@ +/* + * SDRC register values for the Micron MT29C4G48MAYAPAKQ-5 + * + * Copyright (C) 2015 Olio Devices + * Copyright (C) 2008 Texas Instruments, Inc. + * Copyright (C) 2008-2009 Nokia Corporation + * + * Mattis Fjallstrom (mattis at oliodevices.com) + * Paul Walmsley + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef ARCH_ARM_MACH_OMAP2_SDRAM_MICRON_MT29C4G48 +#define ARCH_ARM_MACH_OMAP2_SDRAM_MICRON_MT29C4G48 + +#include "sdrc.h" + +/* Micron MT29C4G48MAYAPAKQ-5 */ +/* 5ns -> 200MHz */ + + +/* 5.4ns -> 185.185185185185 MHz */ +/* 6ns -> 166.666667 MHz */ +/* 7.5ns -> 133.33333333333 */ + +static struct omap_sdrc_params mt29c4g48_sdrc_params[] = { + [0] = { + .rate = 200000000, + .actim_ctrla = 0x7AE1B4C6, + .actim_ctrlb = 0x00021217, + .rfr_ctrl = 0x0005E601, + .mr = 0x00000034, + }, + [1] = { + .rate = 185185185, + .actim_ctrla = 0x72E1B4C6, + .actim_ctrlb = 0x00021215, + .rfr_ctrl = 0x00057201, + .mr = 0x00000034, + }, + [2] = { + .rate = 166000000, + .actim_ctrla = 0x629DB4C6, + .actim_ctrlb = 0x00011113, + .rfr_ctrl = 0x0004E201, + .mr = 0x00000034, + }, + [3] = { + .rate = 133333333, + .actim_ctrla = 0x5259B485, + .actim_ctrlb = 0x0001110F, + .rfr_ctrl = 0x0003DE01, + .mr = 0x00000034, + }, + [4] = { + .rate = 0, + }, +}; + +#endif diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 815d6df8bd5..7c75ab88f9b 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3673,8 +3673,9 @@ regulator_register(const struct regulator_desc *regulator_desc, add_dev: /* add consumers devices */ + if (init_data) { - for (i = 0; i < init_data->num_consumer_supplies; i++) { + for (i = 0; i < init_data->num_consumer_supplies; i++) { ret = set_consumer_device_supply(rdev, init_data->consumer_supplies[i].dev_name, init_data->consumer_supplies[i].supply); @@ -3684,13 +3685,14 @@ add_dev: goto unset_supplies; } } - } + } list_add(&rdev->list, ®ulator_list); rdev_init_debugfs(rdev); out: mutex_unlock(®ulator_list_mutex); + return rdev; unset_supplies: @@ -3710,7 +3712,8 @@ wash: clean: kfree(rdev); rdev = ERR_PTR(ret); - goto out; + + goto out; } EXPORT_SYMBOL_GPL(regulator_register); @@ -3980,8 +3983,12 @@ static int __init regulator_init_complete(void) * with DT to provide them just assume that a DT enabled * system has full constraints. */ + +#if 0 + // TODO OLIO: This assumption isn't true for us. Not yet, at least. if (of_have_populated_dt()) has_full_constraints = true; +#endif mutex_lock(®ulator_list_mutex); diff --git a/drivers/video/omap2/displays/panel-ili9342.c b/drivers/video/omap2/displays/panel-ili9342.c index afcf05dfa79..21bcec734d6 100644 --- a/drivers/video/omap2/displays/panel-ili9342.c +++ b/drivers/video/omap2/displays/panel-ili9342.c @@ -268,13 +268,13 @@ static int ili9342_get_recommended_bpp(struct omap_dss_device *dssdev) { */ static int ili9342_disp_suspend (struct device * dev) { - - return 0; + ili9342_panel_disable((struct omap_dss_device *) dev); + return 0; } static int ili9342_disp_resume (struct device * dev) { - - return 0; + ili9342_panel_enable((struct omap_dss_device *) dev); + return 0; } static struct dev_pm_ops ili9342_disp_pm_ops = { |