The patch titled x86, olpc: move CS5536-related constants to cs5535.h has been added to the -mm tree. Its filename is x86-olpc-move-cs5536-related-constants-to-cs5535h.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: x86, olpc: move CS5536-related constants to cs5535.h From: Daniel Drake <dsd@xxxxxxxxxx> Move these definitions into the relevant header file. This was requested in the review of the upcoming XO-1 suspend/resume code. Signed-off-by: Daniel Drake <dsd@xxxxxxxxxx> Acked-by: Andres Salomon <dilinger@xxxxxxxxxx> Cc: Grant Likely <grant.likely@xxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/x86/platform/olpc/olpc-xo1.c | 26 ++++++++------------------ include/linux/cs5535.h | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 18 deletions(-) diff -puN arch/x86/platform/olpc/olpc-xo1.c~x86-olpc-move-cs5536-related-constants-to-cs5535h arch/x86/platform/olpc/olpc-xo1.c --- a/arch/x86/platform/olpc/olpc-xo1.c~x86-olpc-move-cs5536-related-constants-to-cs5535h +++ a/arch/x86/platform/olpc/olpc-xo1.c @@ -12,6 +12,7 @@ * (at your option) any later version. */ +#include <linux/cs5535.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/pm.h> @@ -22,17 +23,6 @@ #define DRV_NAME "olpc-xo1" -/* PMC registers (PMS block) */ -#define PM_SCLK 0x10 -#define PM_IN_SLPCTL 0x20 -#define PM_WKXD 0x34 -#define PM_WKD 0x30 -#define PM_SSC 0x54 - -/* PM registers (ACPI block) */ -#define PM1_CNT 0x08 -#define PM_GPE0_STS 0x18 - static unsigned long acpi_base; static unsigned long pms_base; @@ -41,17 +31,17 @@ static void xo1_power_off(void) printk(KERN_INFO "OLPC XO-1 power off sequence...\n"); /* Enable all of these controls with 0 delay */ - outl(0x40000000, pms_base + PM_SCLK); - outl(0x40000000, pms_base + PM_IN_SLPCTL); - outl(0x40000000, pms_base + PM_WKXD); - outl(0x40000000, pms_base + PM_WKD); + outl(0x40000000, pms_base + CS5536_PM_SCLK); + outl(0x40000000, pms_base + CS5536_PM_IN_SLPCTL); + outl(0x40000000, pms_base + CS5536_PM_WKXD); + outl(0x40000000, pms_base + CS5536_PM_WKD); /* Clear status bits (possibly unnecessary) */ - outl(0x0002ffff, pms_base + PM_SSC); - outl(0xffffffff, acpi_base + PM_GPE0_STS); + outl(0x0002ffff, pms_base + CS5536_PM_SSC); + outl(0xffffffff, acpi_base + CS5536_PM_GPE0_STS); /* Write SLP_EN bit to start the machinery */ - outl(0x00002000, acpi_base + PM1_CNT); + outl(0x00002000, acpi_base + CS5536_PM1_CNT); } static int __devinit olpc_xo1_probe(struct platform_device *pdev) diff -puN include/linux/cs5535.h~x86-olpc-move-cs5536-related-constants-to-cs5535h include/linux/cs5535.h --- a/include/linux/cs5535.h~x86-olpc-move-cs5536-related-constants-to-cs5535h +++ a/include/linux/cs5535.h @@ -49,6 +49,27 @@ #define LBAR_ACPI_SIZE 0x40 #define LBAR_PMS_SIZE 0x80 +/* + * PMC registers (PMS block) + * It is only safe to access these registers as dword accesses. + * See CS5536 Specification Update erratas 17 & 18 + */ +#define CS5536_PM_SCLK 0x10 +#define CS5536_PM_IN_SLPCTL 0x20 +#define CS5536_PM_WKXD 0x34 +#define CS5536_PM_WKD 0x30 +#define CS5536_PM_SSC 0x54 + +/* + * PM registers (ACPI block) + * It is only safe to access these registers as dword accesses. + * See CS5536 Specification Update erratas 17 & 18 + */ +#define CS5536_PM1_STS 0x00 +#define CS5536_PM1_EN 0x02 +#define CS5536_PM1_CNT 0x08 +#define CS5536_PM_GPE0_STS 0x18 + /* VSA2 magic values */ #define VSA_VRC_INDEX 0xAC1C #define VSA_VRC_DATA 0xAC1E _ Patches currently in -mm which might be from dsd@xxxxxxxxxx are linux-next.patch x86-olpc-add-missing-elements-to-device-tree.patch x86-olpc-move-cs5536-related-constants-to-cs5535h.patch x86-olpc-rename-olpc-xo1-to-olpc-xo1-pm.patch x86-olpc-add-xo-1-suspend-resume-support.patch x86-olpc-add-xo-1-sci-driver-and-power-button-control.patch x86-olpc-ec-sci-wakeup-mask-functionality.patch x86-olpc-xo1-sci-add-gpe-handler-and-ebook-switch-functionality.patch x86-olpc-xo1-sci-add-lid-switch-functionality.patch x86-olpc-xo1-sci-propagate-power-supply-battery-events.patch x86-olpc-add-xo-1-rtc-driver.patch x86-olpc-add-xo-15-sci-driver.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html