Re: [PATCH v4 09/11] macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver
Geert Uytterhoeven writes: > Hi Michael, > > On Mon, Jul 30, 2018 at 8:47 AM Michael Ellerman wrote: >> Finn Thain writes: >> > Now that the PowerMac via-pmu driver supports m68k PowerBooks, >> > switch over to that driver and remove the via-pmu68k driver. >> > >> > Cc: Geert Uytterhoeven >> > Tested-by: Stan Johnson >> > Signed-off-by: Finn Thain >> > --- >> > arch/m68k/configs/mac_defconfig | 2 +- >> > arch/m68k/configs/multi_defconfig | 2 +- >> > arch/m68k/mac/config.c| 2 +- >> > arch/m68k/mac/misc.c | 48 +-- >> > drivers/macintosh/Kconfig | 13 +- >> > drivers/macintosh/Makefile| 1 - >> > drivers/macintosh/adb.c | 2 +- >> > drivers/macintosh/via-pmu68k.c| 846 >> > -- >> > include/uapi/linux/pmu.h | 2 +- >> > 9 files changed, 14 insertions(+), 904 deletions(-) >> > delete mode 100644 drivers/macintosh/via-pmu68k.c >> >> Geert are you OK with this and the other one that touches arch/m68k ? > > Sure, feel free to take them through the PPC tree. > Acked-by: Geert Uytterhoeven Thanks will do. cheers
Re: [PATCH v4 09/11] macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver
Hi Michael, On Mon, Jul 30, 2018 at 8:47 AM Michael Ellerman wrote: > Finn Thain writes: > > Now that the PowerMac via-pmu driver supports m68k PowerBooks, > > switch over to that driver and remove the via-pmu68k driver. > > > > Cc: Geert Uytterhoeven > > Tested-by: Stan Johnson > > Signed-off-by: Finn Thain > > --- > > arch/m68k/configs/mac_defconfig | 2 +- > > arch/m68k/configs/multi_defconfig | 2 +- > > arch/m68k/mac/config.c| 2 +- > > arch/m68k/mac/misc.c | 48 +-- > > drivers/macintosh/Kconfig | 13 +- > > drivers/macintosh/Makefile| 1 - > > drivers/macintosh/adb.c | 2 +- > > drivers/macintosh/via-pmu68k.c| 846 > > -- > > include/uapi/linux/pmu.h | 2 +- > > 9 files changed, 14 insertions(+), 904 deletions(-) > > delete mode 100644 drivers/macintosh/via-pmu68k.c > > Geert are you OK with this and the other one that touches arch/m68k ? Sure, feel free to take them through the PPC tree. Acked-by: Geert Uytterhoeven Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH v4 09/11] macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver
On Mon, Jul 30, 2018 at 9:26 AM Geert Uytterhoeven wrote: > On Mon, Jul 2, 2018 at 10:21 AM Finn Thain wrote: > > Now that the PowerMac via-pmu driver supports m68k PowerBooks, > > switch over to that driver and remove the via-pmu68k driver. > > > > Cc: Geert Uytterhoeven > > Tested-by: Stan Johnson > > Signed-off-by: Finn Thain > > Acked-by: Geert Uytterhoeven Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH v4 09/11] macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver
On Mon, Jul 2, 2018 at 10:21 AM Finn Thain wrote: > Now that the PowerMac via-pmu driver supports m68k PowerBooks, > switch over to that driver and remove the via-pmu68k driver. > > Cc: Geert Uytterhoeven > Tested-by: Stan Johnson > Signed-off-by: Finn Thain Acked-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH v4 09/11] macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver
Finn Thain writes: > Now that the PowerMac via-pmu driver supports m68k PowerBooks, > switch over to that driver and remove the via-pmu68k driver. > > Cc: Geert Uytterhoeven > Tested-by: Stan Johnson > Signed-off-by: Finn Thain > --- > arch/m68k/configs/mac_defconfig | 2 +- > arch/m68k/configs/multi_defconfig | 2 +- > arch/m68k/mac/config.c| 2 +- > arch/m68k/mac/misc.c | 48 +-- > drivers/macintosh/Kconfig | 13 +- > drivers/macintosh/Makefile| 1 - > drivers/macintosh/adb.c | 2 +- > drivers/macintosh/via-pmu68k.c| 846 > -- > include/uapi/linux/pmu.h | 2 +- > 9 files changed, 14 insertions(+), 904 deletions(-) > delete mode 100644 drivers/macintosh/via-pmu68k.c Geert are you OK with this and the other one that touches arch/m68k ? cheers
[PATCH v4 09/11] macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver
Now that the PowerMac via-pmu driver supports m68k PowerBooks, switch over to that driver and remove the via-pmu68k driver. Cc: Geert Uytterhoeven Tested-by: Stan Johnson Signed-off-by: Finn Thain --- arch/m68k/configs/mac_defconfig | 2 +- arch/m68k/configs/multi_defconfig | 2 +- arch/m68k/mac/config.c| 2 +- arch/m68k/mac/misc.c | 48 +-- drivers/macintosh/Kconfig | 13 +- drivers/macintosh/Makefile| 1 - drivers/macintosh/adb.c | 2 +- drivers/macintosh/via-pmu68k.c| 846 -- include/uapi/linux/pmu.h | 2 +- 9 files changed, 14 insertions(+), 904 deletions(-) delete mode 100644 drivers/macintosh/via-pmu68k.c diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig index b52e597899eb..087ca15e32f1 100644 --- a/arch/m68k/configs/mac_defconfig +++ b/arch/m68k/configs/mac_defconfig @@ -369,7 +369,7 @@ CONFIG_TCM_PSCSI=m CONFIG_ADB=y CONFIG_ADB_MACII=y CONFIG_ADB_IOP=y -CONFIG_ADB_PMU68K=y +CONFIG_ADB_PMU=y CONFIG_ADB_CUDA=y CONFIG_INPUT_ADBHID=y CONFIG_MAC_EMUMOUSEBTN=y diff --git a/arch/m68k/configs/multi_defconfig b/arch/m68k/configs/multi_defconfig index 2a84eeec5b02..3f9334084d55 100644 --- a/arch/m68k/configs/multi_defconfig +++ b/arch/m68k/configs/multi_defconfig @@ -402,7 +402,7 @@ CONFIG_TCM_PSCSI=m CONFIG_ADB=y CONFIG_ADB_MACII=y CONFIG_ADB_IOP=y -CONFIG_ADB_PMU68K=y +CONFIG_ADB_PMU=y CONFIG_ADB_CUDA=y CONFIG_INPUT_ADBHID=y CONFIG_MAC_EMUMOUSEBTN=y diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index e522307db47c..92e80cf0d8aa 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -891,7 +891,7 @@ static void __init mac_identify(void) #ifdef CONFIG_ADB_CUDA find_via_cuda(); #endif -#ifdef CONFIG_ADB_PMU68K +#ifdef CONFIG_ADB_PMU find_via_pmu(); #endif } diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c index 7ccb799eeb57..28090a44fa09 100644 --- a/arch/m68k/mac/misc.c +++ b/arch/m68k/mac/misc.c @@ -85,7 +85,7 @@ static void cuda_write_pram(int offset, __u8 data) } #endif /* CONFIG_ADB_CUDA */ -#ifdef CONFIG_ADB_PMU68K +#ifdef CONFIG_ADB_PMU static long pmu_read_time(void) { struct adb_request req; @@ -136,7 +136,7 @@ static void pmu_write_pram(int offset, __u8 data) while (!req.complete) pmu_poll(); } -#endif /* CONFIG_ADB_PMU68K */ +#endif /* CONFIG_ADB_PMU */ /* * VIA PRAM/RTC access routines @@ -367,38 +367,6 @@ static void cuda_shutdown(void) } #endif /* CONFIG_ADB_CUDA */ -#ifdef CONFIG_ADB_PMU68K - -void pmu_restart(void) -{ - struct adb_request req; - if (pmu_request(, NULL, - 2, PMU_SET_INTR_MASK, PMU_INT_ADB|PMU_INT_TICK) < 0) - return; - while (!req.complete) - pmu_poll(); - if (pmu_request(, NULL, 1, PMU_RESET) < 0) - return; - while (!req.complete) - pmu_poll(); -} - -void pmu_shutdown(void) -{ - struct adb_request req; - if (pmu_request(, NULL, - 2, PMU_SET_INTR_MASK, PMU_INT_ADB|PMU_INT_TICK) < 0) - return; - while (!req.complete) - pmu_poll(); - if (pmu_request(, NULL, 5, PMU_SHUTDOWN, 'M', 'A', 'T', 'T') < 0) - return; - while (!req.complete) - pmu_poll(); -} - -#endif - /* *--- * Below this point are the generic routines; they'll dispatch to the @@ -423,7 +391,7 @@ void mac_pram_read(int offset, __u8 *buffer, int len) func = cuda_read_pram; break; #endif -#ifdef CONFIG_ADB_PMU68K +#ifdef CONFIG_ADB_PMU case MAC_ADB_PB2: func = pmu_read_pram; break; @@ -453,7 +421,7 @@ void mac_pram_write(int offset, __u8 *buffer, int len) func = cuda_write_pram; break; #endif -#ifdef CONFIG_ADB_PMU68K +#ifdef CONFIG_ADB_PMU case MAC_ADB_PB2: func = pmu_write_pram; break; @@ -477,7 +445,7 @@ void mac_poweroff(void) macintosh_config->adb_type == MAC_ADB_CUDA) { cuda_shutdown(); #endif -#ifdef CONFIG_ADB_PMU68K +#ifdef CONFIG_ADB_PMU } else if (macintosh_config->adb_type == MAC_ADB_PB2) { pmu_shutdown(); #endif @@ -518,7 +486,7 @@ void mac_reset(void) macintosh_config->adb_type == MAC_ADB_CUDA) { cuda_restart(); #endif -#ifdef CONFIG_ADB_PMU68K +#ifdef CONFIG_ADB_PMU } else if (macintosh_config->adb_type == MAC_ADB_PB2) { pmu_restart(); #endif @@ -670,7 +638,7 @@ int mac_hwclk(int op, struct rtc_time *t) now = cuda_read_time(); break; #endif -#ifdef CONFIG_ADB_PMU68K +#ifdef CONFIG_ADB_PMU case MAC_ADB_PB2: now =