Commit ebd72227 authored by Finn Thain's avatar Finn Thain Committed by Michael Ellerman

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.
Tested-by: default avatarStan Johnson <userm57@yahoo.com>
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 54c99077
...@@ -369,7 +369,7 @@ CONFIG_TCM_PSCSI=m ...@@ -369,7 +369,7 @@ CONFIG_TCM_PSCSI=m
CONFIG_ADB=y CONFIG_ADB=y
CONFIG_ADB_MACII=y CONFIG_ADB_MACII=y
CONFIG_ADB_IOP=y CONFIG_ADB_IOP=y
CONFIG_ADB_PMU68K=y CONFIG_ADB_PMU=y
CONFIG_ADB_CUDA=y CONFIG_ADB_CUDA=y
CONFIG_INPUT_ADBHID=y CONFIG_INPUT_ADBHID=y
CONFIG_MAC_EMUMOUSEBTN=y CONFIG_MAC_EMUMOUSEBTN=y
......
...@@ -402,7 +402,7 @@ CONFIG_TCM_PSCSI=m ...@@ -402,7 +402,7 @@ CONFIG_TCM_PSCSI=m
CONFIG_ADB=y CONFIG_ADB=y
CONFIG_ADB_MACII=y CONFIG_ADB_MACII=y
CONFIG_ADB_IOP=y CONFIG_ADB_IOP=y
CONFIG_ADB_PMU68K=y CONFIG_ADB_PMU=y
CONFIG_ADB_CUDA=y CONFIG_ADB_CUDA=y
CONFIG_INPUT_ADBHID=y CONFIG_INPUT_ADBHID=y
CONFIG_MAC_EMUMOUSEBTN=y CONFIG_MAC_EMUMOUSEBTN=y
......
...@@ -891,7 +891,7 @@ static void __init mac_identify(void) ...@@ -891,7 +891,7 @@ static void __init mac_identify(void)
#ifdef CONFIG_ADB_CUDA #ifdef CONFIG_ADB_CUDA
find_via_cuda(); find_via_cuda();
#endif #endif
#ifdef CONFIG_ADB_PMU68K #ifdef CONFIG_ADB_PMU
find_via_pmu(); find_via_pmu();
#endif #endif
} }
......
...@@ -85,7 +85,7 @@ static void cuda_write_pram(int offset, __u8 data) ...@@ -85,7 +85,7 @@ static void cuda_write_pram(int offset, __u8 data)
} }
#endif /* CONFIG_ADB_CUDA */ #endif /* CONFIG_ADB_CUDA */
#ifdef CONFIG_ADB_PMU68K #ifdef CONFIG_ADB_PMU
static long pmu_read_time(void) static long pmu_read_time(void)
{ {
struct adb_request req; struct adb_request req;
...@@ -136,7 +136,7 @@ static void pmu_write_pram(int offset, __u8 data) ...@@ -136,7 +136,7 @@ static void pmu_write_pram(int offset, __u8 data)
while (!req.complete) while (!req.complete)
pmu_poll(); pmu_poll();
} }
#endif /* CONFIG_ADB_PMU68K */ #endif /* CONFIG_ADB_PMU */
/* /*
* VIA PRAM/RTC access routines * VIA PRAM/RTC access routines
...@@ -367,38 +367,6 @@ static void cuda_shutdown(void) ...@@ -367,38 +367,6 @@ static void cuda_shutdown(void)
} }
#endif /* CONFIG_ADB_CUDA */ #endif /* CONFIG_ADB_CUDA */
#ifdef CONFIG_ADB_PMU68K
void pmu_restart(void)
{
struct adb_request req;
if (pmu_request(&req, NULL,
2, PMU_SET_INTR_MASK, PMU_INT_ADB|PMU_INT_TICK) < 0)
return;
while (!req.complete)
pmu_poll();
if (pmu_request(&req, NULL, 1, PMU_RESET) < 0)
return;
while (!req.complete)
pmu_poll();
}
void pmu_shutdown(void)
{
struct adb_request req;
if (pmu_request(&req, NULL,
2, PMU_SET_INTR_MASK, PMU_INT_ADB|PMU_INT_TICK) < 0)
return;
while (!req.complete)
pmu_poll();
if (pmu_request(&req, 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 * 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) ...@@ -423,7 +391,7 @@ void mac_pram_read(int offset, __u8 *buffer, int len)
func = cuda_read_pram; func = cuda_read_pram;
break; break;
#endif #endif
#ifdef CONFIG_ADB_PMU68K #ifdef CONFIG_ADB_PMU
case MAC_ADB_PB2: case MAC_ADB_PB2:
func = pmu_read_pram; func = pmu_read_pram;
break; break;
...@@ -453,7 +421,7 @@ void mac_pram_write(int offset, __u8 *buffer, int len) ...@@ -453,7 +421,7 @@ void mac_pram_write(int offset, __u8 *buffer, int len)
func = cuda_write_pram; func = cuda_write_pram;
break; break;
#endif #endif
#ifdef CONFIG_ADB_PMU68K #ifdef CONFIG_ADB_PMU
case MAC_ADB_PB2: case MAC_ADB_PB2:
func = pmu_write_pram; func = pmu_write_pram;
break; break;
...@@ -477,7 +445,7 @@ void mac_poweroff(void) ...@@ -477,7 +445,7 @@ void mac_poweroff(void)
macintosh_config->adb_type == MAC_ADB_CUDA) { macintosh_config->adb_type == MAC_ADB_CUDA) {
cuda_shutdown(); cuda_shutdown();
#endif #endif
#ifdef CONFIG_ADB_PMU68K #ifdef CONFIG_ADB_PMU
} else if (macintosh_config->adb_type == MAC_ADB_PB2) { } else if (macintosh_config->adb_type == MAC_ADB_PB2) {
pmu_shutdown(); pmu_shutdown();
#endif #endif
...@@ -518,7 +486,7 @@ void mac_reset(void) ...@@ -518,7 +486,7 @@ void mac_reset(void)
macintosh_config->adb_type == MAC_ADB_CUDA) { macintosh_config->adb_type == MAC_ADB_CUDA) {
cuda_restart(); cuda_restart();
#endif #endif
#ifdef CONFIG_ADB_PMU68K #ifdef CONFIG_ADB_PMU
} else if (macintosh_config->adb_type == MAC_ADB_PB2) { } else if (macintosh_config->adb_type == MAC_ADB_PB2) {
pmu_restart(); pmu_restart();
#endif #endif
...@@ -670,7 +638,7 @@ int mac_hwclk(int op, struct rtc_time *t) ...@@ -670,7 +638,7 @@ int mac_hwclk(int op, struct rtc_time *t)
now = cuda_read_time(); now = cuda_read_time();
break; break;
#endif #endif
#ifdef CONFIG_ADB_PMU68K #ifdef CONFIG_ADB_PMU
case MAC_ADB_PB2: case MAC_ADB_PB2:
now = pmu_read_time(); now = pmu_read_time();
break; break;
...@@ -706,7 +674,7 @@ int mac_hwclk(int op, struct rtc_time *t) ...@@ -706,7 +674,7 @@ int mac_hwclk(int op, struct rtc_time *t)
cuda_write_time(now); cuda_write_time(now);
break; break;
#endif #endif
#ifdef CONFIG_ADB_PMU68K #ifdef CONFIG_ADB_PMU
case MAC_ADB_PB2: case MAC_ADB_PB2:
pmu_write_time(now); pmu_write_time(now);
break; break;
......
...@@ -39,17 +39,6 @@ config ADB_IOP ...@@ -39,17 +39,6 @@ config ADB_IOP
<http://www.angelfire.com/ca2/dev68k/iopdesc.html> to enable direct <http://www.angelfire.com/ca2/dev68k/iopdesc.html> to enable direct
support for it, say 'Y' here. support for it, say 'Y' here.
config ADB_PMU68K
bool "Include PMU (Powerbook) ADB driver"
depends on ADB && MAC
help
Say Y here if want your kernel to support the m68k based Powerbooks.
This includes the PowerBook 140, PowerBook 145, PowerBook 150,
PowerBook 160, PowerBook 165, PowerBook 165c, PowerBook 170,
PowerBook 180, PowerBook, 180c, PowerBook 190cs, PowerBook 520,
PowerBook Duo 210, PowerBook Duo 230, PowerBook Duo 250,
PowerBook Duo 270c, PowerBook Duo 280 and PowerBook Duo 280c.
# we want to change this to something like CONFIG_SYSCTRL_CUDA/PMU # we want to change this to something like CONFIG_SYSCTRL_CUDA/PMU
config ADB_CUDA config ADB_CUDA
bool "Support for Cuda/Egret based Macs and PowerMacs" bool "Support for Cuda/Egret based Macs and PowerMacs"
...@@ -66,7 +55,7 @@ config ADB_CUDA ...@@ -66,7 +55,7 @@ config ADB_CUDA
config ADB_PMU config ADB_PMU
bool "Support for PMU based PowerMacs and PowerBooks" bool "Support for PMU based PowerMacs and PowerBooks"
depends on PPC_PMAC depends on PPC_PMAC || MAC
help help
On PowerBooks, iBooks, and recent iMacs and Power Macintoshes, the On PowerBooks, iBooks, and recent iMacs and Power Macintoshes, the
PMU is an embedded microprocessor whose primary function is to PMU is an embedded microprocessor whose primary function is to
......
...@@ -22,7 +22,6 @@ obj-$(CONFIG_PMAC_SMU) += smu.o ...@@ -22,7 +22,6 @@ obj-$(CONFIG_PMAC_SMU) += smu.o
obj-$(CONFIG_ADB) += adb.o obj-$(CONFIG_ADB) += adb.o
obj-$(CONFIG_ADB_MACII) += via-macii.o obj-$(CONFIG_ADB_MACII) += via-macii.o
obj-$(CONFIG_ADB_IOP) += adb-iop.o obj-$(CONFIG_ADB_IOP) += adb-iop.o
obj-$(CONFIG_ADB_PMU68K) += via-pmu68k.o
obj-$(CONFIG_ADB_MACIO) += macio-adb.o obj-$(CONFIG_ADB_MACIO) += macio-adb.o
obj-$(CONFIG_THERM_WINDTUNNEL) += therm_windtunnel.o obj-$(CONFIG_THERM_WINDTUNNEL) += therm_windtunnel.o
......
...@@ -65,7 +65,7 @@ static struct adb_driver *adb_driver_list[] = { ...@@ -65,7 +65,7 @@ static struct adb_driver *adb_driver_list[] = {
#ifdef CONFIG_ADB_IOP #ifdef CONFIG_ADB_IOP
&adb_iop_driver, &adb_iop_driver,
#endif #endif
#if defined(CONFIG_ADB_PMU) || defined(CONFIG_ADB_PMU68K) #ifdef CONFIG_ADB_PMU
&via_pmu_driver, &via_pmu_driver,
#endif #endif
#ifdef CONFIG_ADB_MACIO #ifdef CONFIG_ADB_MACIO
......
This diff is collapsed.
...@@ -94,7 +94,7 @@ enum { ...@@ -94,7 +94,7 @@ enum {
PMU_PADDINGTON_BASED, /* 1999 PowerBook G3 */ PMU_PADDINGTON_BASED, /* 1999 PowerBook G3 */
PMU_KEYLARGO_BASED, /* Core99 motherboard (PMU99) */ PMU_KEYLARGO_BASED, /* Core99 motherboard (PMU99) */
PMU_68K_V1, /* Unused/deprecated */ PMU_68K_V1, /* Unused/deprecated */
PMU_68K_V2, /* 68K PMU, version 2 */ PMU_68K_V2, /* Unused/deprecated */
}; };
/* PMU PMU_POWER_EVENTS commands */ /* PMU PMU_POWER_EVENTS commands */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment