[PATCH 1/7] Remove existing twl4030 power script code.
First we remove the existing twl4030 power sequencer code. Signed-off-by: Peter 'p2' De Schrijver <[EMAIL PROTECTED]> --- drivers/i2c/chips/Makefile|2 +- drivers/i2c/chips/twl4030-power.c | 343 - 2 files changed, 1 insertions(+), 344 deletions(-) delete mode 100644 drivers/i2c/chips/twl4030-power.c diff --git a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile index ba41a57..7e0fdfa 100644 --- a/drivers/i2c/chips/Makefile +++ b/drivers/i2c/chips/Makefile @@ -24,7 +24,7 @@ obj-$(CONFIG_GPIOEXPANDER_OMAP) += gpio_expander_omap.o obj-$(CONFIG_MENELAUS) += menelaus.o obj-$(CONFIG_SENSORS_TSL2550) += tsl2550.o obj-$(CONFIG_SENSORS_TSL2563) += tsl2563.o -obj-$(CONFIG_TWL4030_CORE) += twl4030-pwrirq.o twl4030-power.o +obj-$(CONFIG_TWL4030_CORE) += twl4030-pwrirq.o obj-$(CONFIG_TWL4030_USB) += twl4030-usb.o obj-$(CONFIG_TWL4030_POWEROFF) += twl4030-poweroff.o obj-$(CONFIG_TWL4030_PWRBUTTON)+= twl4030-pwrbutton.o diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c deleted file mode 100644 index cb325b0..000 --- a/drivers/i2c/chips/twl4030-power.c +++ /dev/null @@ -1,343 +0,0 @@ -/* - * linux/drivers/i2c/chips/twl4030-power.c - * - * Handle TWL4030 Power initialization - * - * Copyright (C) 2008 Nokia Corporation - * Copyright (C) 2006 Texas Instruments, Inc - * - * Written by Kalle Jokiniemi - * Peter De Schrijver <[EMAIL PROTECTED]> - * - * This file is subject to the terms and conditions of the GNU General - * Public License. See the file "COPYING" in the main directory of this - * archive for more details. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include - -#include - -#define PWR_P1_SW_EVENTS 0x10 -#define PWR_DEVOFF (1<<0) - -#define PHY_TO_OFF_PM_MASTER(p)(p - 0x36) -#define PHY_TO_OFF_PM_RECIEVER(p) (p - 0x5b) - -/* resource - hfclk */ -#define R_HFCLKOUT_DEV_GRP PHY_TO_OFF_PM_RECIEVER(0xe6) - -/* PM events */ -#define R_P1_SW_EVENTS PHY_TO_OFF_PM_MASTER(0x46) -#define R_P2_SW_EVENTS PHY_TO_OFF_PM_MASTER(0x47) -#define R_P3_SW_EVENTS PHY_TO_OFF_PM_MASTER(0x48) -#define R_CFG_P1_TRANSITIONPHY_TO_OFF_PM_MASTER(0x36) -#define R_CFG_P2_TRANSITIONPHY_TO_OFF_PM_MASTER(0x37) -#define R_CFG_P3_TRANSITIONPHY_TO_OFF_PM_MASTER(0x38) - -#define LVL_WAKEUP 0x08 - -#define ENABLE_WARMRESET (1<<4) - -/* sequence script */ - -#define END_OF_SCRIPT 0x3f - -#define R_SEQ_ADD_A2S PHY_TO_OFF_PM_MASTER(0x55) -#define R_SEQ_ADD_SA12 PHY_TO_OFF_PM_MASTER(0x56) -#defineR_SEQ_ADD_S2A3 PHY_TO_OFF_PM_MASTER(0x57) -#defineR_SEQ_ADD_WARM PHY_TO_OFF_PM_MASTER(0x58) -#define R_MEMORY_ADDRESS PHY_TO_OFF_PM_MASTER(0x59) -#define R_MEMORY_DATA PHY_TO_OFF_PM_MASTER(0x5a) - -/* Power bus message definitions */ - -#define DEV_GRP_NULL 0x0 -#define DEV_GRP_P1 0x1 -#define DEV_GRP_P2 0x2 -#define DEV_GRP_P3 0x4 - -#define RES_GRP_RES0x0 -#define RES_GRP_PP 0x1 -#define RES_GRP_RC 0x2 -#define RES_GRP_PP_RC 0x3 -#define RES_GRP_PR 0x4 -#define RES_GRP_PP_PR 0x5 -#define RES_GRP_RC_PR 0x6 -#define RES_GRP_ALL0x7 - -#define RES_TYPE2_R0 0x0 - -#define RES_TYPE_ALL 0x7 - -#define RES_STATE_WRST 0xF -#define RES_STATE_ACTIVE 0xE -#define RES_STATE_SLEEP0x8 -#define RES_STATE_OFF 0x0 - -/* -* Power Bus Message Format -* -* Broadcast Message (16 Bits) -* DEV_GRP[15:13] MT[12] RES_GRP[11:9] RES_TYPE2[8:7] RES_TYPE[6:4] -* RES_STATE[3:0] -* -* Singular Message (16 Bits) -* DEV_GRP[15:13] MT[12] RES_ID[11:4] RES_STATE[3:0] -* -*/ - -#define MSG_BROADCAST(devgrp, grp, type, type2, state) \ - (devgrp << 13 | 1 << 12 | grp << 9 | type2 << 7 | type << 4 | state) - -#define MSG_SINGULAR(devgrp, id, state) \ - (devgrp << 13 | 0 << 12 | id << 4 | state) - -#define R_PROTECT_KEY 0x0E -#define KEY_1 0xC0 -#define KEY_2 0x0C - -struct triton_ins { - u16 pmb_message; - u8 delay; -}; - - -#define CONFIG_DISABLE_HFCLK 1 - -#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR) - -struct triton_ins sleep_on_seq[] __initdata = { - {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_OFF), 4}, - {MSG_SINGULA
Re: [PATCH 1/7] Remove existing twl4030 power script code.
On Fri, Oct 10, 2008 at 07:56:10PM +0300, Peter 'p2' De Schrijver wrote: > First we remove the existing twl4030 power sequencer code. > > Signed-off-by: Peter 'p2' De Schrijver <[EMAIL PROTECTED]> > --- > drivers/i2c/chips/twl4030-power.c | 343 > - Missed Makefile changes. Will break tree compilation. -- balbi -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/7] Remove existing twl4030 power script code.
First we remove the existing twl4030 power sequencer code. Signed-off-by: Peter 'p2' De Schrijver <[EMAIL PROTECTED]> --- drivers/i2c/chips/twl4030-power.c | 343 - 1 files changed, 0 insertions(+), 343 deletions(-) delete mode 100644 drivers/i2c/chips/twl4030-power.c diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c deleted file mode 100644 index cb325b0..000 --- a/drivers/i2c/chips/twl4030-power.c +++ /dev/null @@ -1,343 +0,0 @@ -/* - * linux/drivers/i2c/chips/twl4030-power.c - * - * Handle TWL4030 Power initialization - * - * Copyright (C) 2008 Nokia Corporation - * Copyright (C) 2006 Texas Instruments, Inc - * - * Written by Kalle Jokiniemi - * Peter De Schrijver <[EMAIL PROTECTED]> - * - * This file is subject to the terms and conditions of the GNU General - * Public License. See the file "COPYING" in the main directory of this - * archive for more details. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include - -#include - -#define PWR_P1_SW_EVENTS 0x10 -#define PWR_DEVOFF (1<<0) - -#define PHY_TO_OFF_PM_MASTER(p)(p - 0x36) -#define PHY_TO_OFF_PM_RECIEVER(p) (p - 0x5b) - -/* resource - hfclk */ -#define R_HFCLKOUT_DEV_GRP PHY_TO_OFF_PM_RECIEVER(0xe6) - -/* PM events */ -#define R_P1_SW_EVENTS PHY_TO_OFF_PM_MASTER(0x46) -#define R_P2_SW_EVENTS PHY_TO_OFF_PM_MASTER(0x47) -#define R_P3_SW_EVENTS PHY_TO_OFF_PM_MASTER(0x48) -#define R_CFG_P1_TRANSITIONPHY_TO_OFF_PM_MASTER(0x36) -#define R_CFG_P2_TRANSITIONPHY_TO_OFF_PM_MASTER(0x37) -#define R_CFG_P3_TRANSITIONPHY_TO_OFF_PM_MASTER(0x38) - -#define LVL_WAKEUP 0x08 - -#define ENABLE_WARMRESET (1<<4) - -/* sequence script */ - -#define END_OF_SCRIPT 0x3f - -#define R_SEQ_ADD_A2S PHY_TO_OFF_PM_MASTER(0x55) -#define R_SEQ_ADD_SA12 PHY_TO_OFF_PM_MASTER(0x56) -#defineR_SEQ_ADD_S2A3 PHY_TO_OFF_PM_MASTER(0x57) -#defineR_SEQ_ADD_WARM PHY_TO_OFF_PM_MASTER(0x58) -#define R_MEMORY_ADDRESS PHY_TO_OFF_PM_MASTER(0x59) -#define R_MEMORY_DATA PHY_TO_OFF_PM_MASTER(0x5a) - -/* Power bus message definitions */ - -#define DEV_GRP_NULL 0x0 -#define DEV_GRP_P1 0x1 -#define DEV_GRP_P2 0x2 -#define DEV_GRP_P3 0x4 - -#define RES_GRP_RES0x0 -#define RES_GRP_PP 0x1 -#define RES_GRP_RC 0x2 -#define RES_GRP_PP_RC 0x3 -#define RES_GRP_PR 0x4 -#define RES_GRP_PP_PR 0x5 -#define RES_GRP_RC_PR 0x6 -#define RES_GRP_ALL0x7 - -#define RES_TYPE2_R0 0x0 - -#define RES_TYPE_ALL 0x7 - -#define RES_STATE_WRST 0xF -#define RES_STATE_ACTIVE 0xE -#define RES_STATE_SLEEP0x8 -#define RES_STATE_OFF 0x0 - -/* -* Power Bus Message Format -* -* Broadcast Message (16 Bits) -* DEV_GRP[15:13] MT[12] RES_GRP[11:9] RES_TYPE2[8:7] RES_TYPE[6:4] -* RES_STATE[3:0] -* -* Singular Message (16 Bits) -* DEV_GRP[15:13] MT[12] RES_ID[11:4] RES_STATE[3:0] -* -*/ - -#define MSG_BROADCAST(devgrp, grp, type, type2, state) \ - (devgrp << 13 | 1 << 12 | grp << 9 | type2 << 7 | type << 4 | state) - -#define MSG_SINGULAR(devgrp, id, state) \ - (devgrp << 13 | 0 << 12 | id << 4 | state) - -#define R_PROTECT_KEY 0x0E -#define KEY_1 0xC0 -#define KEY_2 0x0C - -struct triton_ins { - u16 pmb_message; - u8 delay; -}; - - -#define CONFIG_DISABLE_HFCLK 1 - -#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR) - -struct triton_ins sleep_on_seq[] __initdata = { - {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_OFF), 4}, - {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_OFF), 2}, -#ifdef CONFIG_DISABLE_HFCLK - {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_OFF), 3}, - {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_OFF), 3}, -#endif /* #ifdef CONFIG_DISABLE_HFCLK */ -}; - -struct triton_ins sleep_off_seq[] __initdata = { -#ifndef CONFIG_DISABLE_HFCLK - {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 4}, - {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 2}, -#else - {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_ACTIVE), 0x30}, - {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 0x30}, - {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 0x37}, - {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 3}, -#end