Skip to content

Commit ebd7222

Browse files
Finn Thainmpe
authored andcommitted
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: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 54c9907 commit ebd7222

File tree

9 files changed

+14
-904
lines changed

9 files changed

+14
-904
lines changed

arch/m68k/configs/mac_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ CONFIG_TCM_PSCSI=m
369369
CONFIG_ADB=y
370370
CONFIG_ADB_MACII=y
371371
CONFIG_ADB_IOP=y
372-
CONFIG_ADB_PMU68K=y
372+
CONFIG_ADB_PMU=y
373373
CONFIG_ADB_CUDA=y
374374
CONFIG_INPUT_ADBHID=y
375375
CONFIG_MAC_EMUMOUSEBTN=y

arch/m68k/configs/multi_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ CONFIG_TCM_PSCSI=m
402402
CONFIG_ADB=y
403403
CONFIG_ADB_MACII=y
404404
CONFIG_ADB_IOP=y
405-
CONFIG_ADB_PMU68K=y
405+
CONFIG_ADB_PMU=y
406406
CONFIG_ADB_CUDA=y
407407
CONFIG_INPUT_ADBHID=y
408408
CONFIG_MAC_EMUMOUSEBTN=y

arch/m68k/mac/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ static void __init mac_identify(void)
891891
#ifdef CONFIG_ADB_CUDA
892892
find_via_cuda();
893893
#endif
894-
#ifdef CONFIG_ADB_PMU68K
894+
#ifdef CONFIG_ADB_PMU
895895
find_via_pmu();
896896
#endif
897897
}

arch/m68k/mac/misc.c

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static void cuda_write_pram(int offset, __u8 data)
8585
}
8686
#endif /* CONFIG_ADB_CUDA */
8787

88-
#ifdef CONFIG_ADB_PMU68K
88+
#ifdef CONFIG_ADB_PMU
8989
static long pmu_read_time(void)
9090
{
9191
struct adb_request req;
@@ -136,7 +136,7 @@ static void pmu_write_pram(int offset, __u8 data)
136136
while (!req.complete)
137137
pmu_poll();
138138
}
139-
#endif /* CONFIG_ADB_PMU68K */
139+
#endif /* CONFIG_ADB_PMU */
140140

141141
/*
142142
* VIA PRAM/RTC access routines
@@ -367,38 +367,6 @@ static void cuda_shutdown(void)
367367
}
368368
#endif /* CONFIG_ADB_CUDA */
369369

370-
#ifdef CONFIG_ADB_PMU68K
371-
372-
void pmu_restart(void)
373-
{
374-
struct adb_request req;
375-
if (pmu_request(&req, NULL,
376-
2, PMU_SET_INTR_MASK, PMU_INT_ADB|PMU_INT_TICK) < 0)
377-
return;
378-
while (!req.complete)
379-
pmu_poll();
380-
if (pmu_request(&req, NULL, 1, PMU_RESET) < 0)
381-
return;
382-
while (!req.complete)
383-
pmu_poll();
384-
}
385-
386-
void pmu_shutdown(void)
387-
{
388-
struct adb_request req;
389-
if (pmu_request(&req, NULL,
390-
2, PMU_SET_INTR_MASK, PMU_INT_ADB|PMU_INT_TICK) < 0)
391-
return;
392-
while (!req.complete)
393-
pmu_poll();
394-
if (pmu_request(&req, NULL, 5, PMU_SHUTDOWN, 'M', 'A', 'T', 'T') < 0)
395-
return;
396-
while (!req.complete)
397-
pmu_poll();
398-
}
399-
400-
#endif
401-
402370
/*
403371
*-------------------------------------------------------------------
404372
* 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)
423391
func = cuda_read_pram;
424392
break;
425393
#endif
426-
#ifdef CONFIG_ADB_PMU68K
394+
#ifdef CONFIG_ADB_PMU
427395
case MAC_ADB_PB2:
428396
func = pmu_read_pram;
429397
break;
@@ -453,7 +421,7 @@ void mac_pram_write(int offset, __u8 *buffer, int len)
453421
func = cuda_write_pram;
454422
break;
455423
#endif
456-
#ifdef CONFIG_ADB_PMU68K
424+
#ifdef CONFIG_ADB_PMU
457425
case MAC_ADB_PB2:
458426
func = pmu_write_pram;
459427
break;
@@ -477,7 +445,7 @@ void mac_poweroff(void)
477445
macintosh_config->adb_type == MAC_ADB_CUDA) {
478446
cuda_shutdown();
479447
#endif
480-
#ifdef CONFIG_ADB_PMU68K
448+
#ifdef CONFIG_ADB_PMU
481449
} else if (macintosh_config->adb_type == MAC_ADB_PB2) {
482450
pmu_shutdown();
483451
#endif
@@ -518,7 +486,7 @@ void mac_reset(void)
518486
macintosh_config->adb_type == MAC_ADB_CUDA) {
519487
cuda_restart();
520488
#endif
521-
#ifdef CONFIG_ADB_PMU68K
489+
#ifdef CONFIG_ADB_PMU
522490
} else if (macintosh_config->adb_type == MAC_ADB_PB2) {
523491
pmu_restart();
524492
#endif
@@ -670,7 +638,7 @@ int mac_hwclk(int op, struct rtc_time *t)
670638
now = cuda_read_time();
671639
break;
672640
#endif
673-
#ifdef CONFIG_ADB_PMU68K
641+
#ifdef CONFIG_ADB_PMU
674642
case MAC_ADB_PB2:
675643
now = pmu_read_time();
676644
break;
@@ -706,7 +674,7 @@ int mac_hwclk(int op, struct rtc_time *t)
706674
cuda_write_time(now);
707675
break;
708676
#endif
709-
#ifdef CONFIG_ADB_PMU68K
677+
#ifdef CONFIG_ADB_PMU
710678
case MAC_ADB_PB2:
711679
pmu_write_time(now);
712680
break;

drivers/macintosh/Kconfig

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,6 @@ config ADB_IOP
3939
<http://www.angelfire.com/ca2/dev68k/iopdesc.html> to enable direct
4040
support for it, say 'Y' here.
4141

42-
config ADB_PMU68K
43-
bool "Include PMU (Powerbook) ADB driver"
44-
depends on ADB && MAC
45-
help
46-
Say Y here if want your kernel to support the m68k based Powerbooks.
47-
This includes the PowerBook 140, PowerBook 145, PowerBook 150,
48-
PowerBook 160, PowerBook 165, PowerBook 165c, PowerBook 170,
49-
PowerBook 180, PowerBook, 180c, PowerBook 190cs, PowerBook 520,
50-
PowerBook Duo 210, PowerBook Duo 230, PowerBook Duo 250,
51-
PowerBook Duo 270c, PowerBook Duo 280 and PowerBook Duo 280c.
52-
5342
# we want to change this to something like CONFIG_SYSCTRL_CUDA/PMU
5443
config ADB_CUDA
5544
bool "Support for Cuda/Egret based Macs and PowerMacs"
@@ -66,7 +55,7 @@ config ADB_CUDA
6655

6756
config ADB_PMU
6857
bool "Support for PMU based PowerMacs and PowerBooks"
69-
depends on PPC_PMAC
58+
depends on PPC_PMAC || MAC
7059
help
7160
On PowerBooks, iBooks, and recent iMacs and Power Macintoshes, the
7261
PMU is an embedded microprocessor whose primary function is to

drivers/macintosh/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ obj-$(CONFIG_PMAC_SMU) += smu.o
2222
obj-$(CONFIG_ADB) += adb.o
2323
obj-$(CONFIG_ADB_MACII) += via-macii.o
2424
obj-$(CONFIG_ADB_IOP) += adb-iop.o
25-
obj-$(CONFIG_ADB_PMU68K) += via-pmu68k.o
2625
obj-$(CONFIG_ADB_MACIO) += macio-adb.o
2726

2827
obj-$(CONFIG_THERM_WINDTUNNEL) += therm_windtunnel.o

drivers/macintosh/adb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static struct adb_driver *adb_driver_list[] = {
6565
#ifdef CONFIG_ADB_IOP
6666
&adb_iop_driver,
6767
#endif
68-
#if defined(CONFIG_ADB_PMU) || defined(CONFIG_ADB_PMU68K)
68+
#ifdef CONFIG_ADB_PMU
6969
&via_pmu_driver,
7070
#endif
7171
#ifdef CONFIG_ADB_MACIO

0 commit comments

Comments
 (0)