Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c870933 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds
Browse files

[PATCH] ppc32: Remove CONFIG_PMAC_PBOOK



This patch removes CONFIG_PMAC_PBOOK (PowerBook support).  This is now
split into CONFIG_PMAC_MEDIABAY for the actual hotswap bay that some
powerbooks have, CONFIG_PM for power management related code, and just left
out of any CONFIG_* option for some generally useful stuff that can be used
on non-laptops as well.

Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fcd16cc0
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -46,7 +46,7 @@
	.section .text
	.section .text
	.align	5
	.align	5


#if defined(CONFIG_PMAC_PBOOK) || defined(CONFIG_CPU_FREQ_PMAC)
#if defined(CONFIG_PM) || defined(CONFIG_CPU_FREQ_PMAC)


/* This gets called by via-pmu.c late during the sleep process.
/* This gets called by via-pmu.c late during the sleep process.
 * The PMU was already send the sleep command and will shut us down
 * The PMU was already send the sleep command and will shut us down
@@ -382,7 +382,7 @@ turn_on_mmu:
	isync
	isync
	rfi
	rfi


#endif /* defined(CONFIG_PMAC_PBOOK) || defined(CONFIG_CPU_FREQ) */
#endif /* defined(CONFIG_PM) || defined(CONFIG_CPU_FREQ) */


	.section .data
	.section .data
	.balign	L1_CACHE_LINE_SIZE
	.balign	L1_CACHE_LINE_SIZE
+4 −4
Original line number Original line Diff line number Diff line
@@ -206,7 +206,7 @@ via_calibrate_decr(void)
	return 1;
	return 1;
}
}


#ifdef CONFIG_PMAC_PBOOK
#ifdef CONFIG_PM
/*
/*
 * Reset the time after a sleep.
 * Reset the time after a sleep.
 */
 */
@@ -238,7 +238,7 @@ time_sleep_notify(struct pmu_sleep_notifier *self, int when)
static struct pmu_sleep_notifier time_sleep_notifier __pmacdata = {
static struct pmu_sleep_notifier time_sleep_notifier __pmacdata = {
	time_sleep_notify, SLEEP_LEVEL_MISC,
	time_sleep_notify, SLEEP_LEVEL_MISC,
};
};
#endif /* CONFIG_PMAC_PBOOK */
#endif /* CONFIG_PM */


/*
/*
 * Query the OF and get the decr frequency.
 * Query the OF and get the decr frequency.
@@ -251,9 +251,9 @@ pmac_calibrate_decr(void)
	struct device_node *cpu;
	struct device_node *cpu;
	unsigned int freq, *fp;
	unsigned int freq, *fp;


#ifdef CONFIG_PMAC_PBOOK
#ifdef CONFIG_PM
	pmu_register_sleep_notifier(&time_sleep_notifier);
	pmu_register_sleep_notifier(&time_sleep_notifier);
#endif /* CONFIG_PMAC_PBOOK */
#endif /* CONFIG_PM */


	/* We assume MacRISC2 machines have correct device-tree
	/* We assume MacRISC2 machines have correct device-tree
	 * calibration. That's better since the VIA itself seems
	 * calibration. That's better since the VIA itself seems
+9 −1
Original line number Original line Diff line number Diff line
@@ -253,7 +253,7 @@ static int floppy_revalidate(struct gendisk *disk);
static int swim3_add_device(struct device_node *swims);
static int swim3_add_device(struct device_node *swims);
int swim3_init(void);
int swim3_init(void);


#ifndef CONFIG_PMAC_PBOOK
#ifndef CONFIG_PMAC_MEDIABAY
#define check_media_bay(which, what)	1
#define check_media_bay(which, what)	1
#endif
#endif


@@ -297,9 +297,11 @@ static void do_fd_request(request_queue_t * q)
	int i;
	int i;
	for(i=0;i<floppy_count;i++)
	for(i=0;i<floppy_count;i++)
	{
	{
#ifdef CONFIG_PMAC_MEDIABAY
		if (floppy_states[i].media_bay &&
		if (floppy_states[i].media_bay &&
			check_media_bay(floppy_states[i].media_bay, MB_FD))
			check_media_bay(floppy_states[i].media_bay, MB_FD))
			continue;
			continue;
#endif /* CONFIG_PMAC_MEDIABAY */
		start_request(&floppy_states[i]);
		start_request(&floppy_states[i]);
	}
	}
	sti();
	sti();
@@ -856,8 +858,10 @@ static int floppy_ioctl(struct inode *inode, struct file *filp,
	if ((cmd & 0x80) && !capable(CAP_SYS_ADMIN))
	if ((cmd & 0x80) && !capable(CAP_SYS_ADMIN))
		return -EPERM;
		return -EPERM;


#ifdef CONFIG_PMAC_MEDIABAY
	if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD))
	if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD))
		return -ENXIO;
		return -ENXIO;
#endif


	switch (cmd) {
	switch (cmd) {
	case FDEJECT:
	case FDEJECT:
@@ -881,8 +885,10 @@ static int floppy_open(struct inode *inode, struct file *filp)
	int n, err = 0;
	int n, err = 0;


	if (fs->ref_count == 0) {
	if (fs->ref_count == 0) {
#ifdef CONFIG_PMAC_MEDIABAY
		if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD))
		if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD))
			return -ENXIO;
			return -ENXIO;
#endif
		out_8(&sw->setup, S_IBM_DRIVE | S_FCLK_DIV2);
		out_8(&sw->setup, S_IBM_DRIVE | S_FCLK_DIV2);
		out_8(&sw->control_bic, 0xff);
		out_8(&sw->control_bic, 0xff);
		out_8(&sw->mode, 0x95);
		out_8(&sw->mode, 0x95);
@@ -967,8 +973,10 @@ static int floppy_revalidate(struct gendisk *disk)
	struct swim3 __iomem *sw;
	struct swim3 __iomem *sw;
	int ret, n;
	int ret, n;


#ifdef CONFIG_PMAC_MEDIABAY
	if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD))
	if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD))
		return -ENXIO;
		return -ENXIO;
#endif


	sw = fs->swim3;
	sw = fs->swim3;
	grab_drive(fs, revalidating, 0);
	grab_drive(fs, revalidating, 0);
+0 −3
Original line number Original line Diff line number Diff line
@@ -308,9 +308,6 @@ static int __init misc_init(void)
#endif
#endif
#ifdef CONFIG_BVME6000
#ifdef CONFIG_BVME6000
	rtc_DP8570A_init();
	rtc_DP8570A_init();
#endif
#ifdef CONFIG_PMAC_PBOOK
	pmu_device_init();
#endif
#endif
	if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) {
	if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) {
		printk("unable to get major %d for misc devices\n",
		printk("unable to get major %d for misc devices\n",
+4 −4
Original line number Original line Diff line number Diff line
@@ -1324,9 +1324,9 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
	/* XXX FIXME: Media bay stuff need re-organizing */
	/* XXX FIXME: Media bay stuff need re-organizing */
	if (np->parent && np->parent->name
	if (np->parent && np->parent->name
	    && strcasecmp(np->parent->name, "media-bay") == 0) {
	    && strcasecmp(np->parent->name, "media-bay") == 0) {
#ifdef CONFIG_PMAC_PBOOK
#ifdef CONFIG_PMAC_MEDIABAY
		media_bay_set_ide_infos(np->parent, pmif->regbase, pmif->irq, hwif->index);
		media_bay_set_ide_infos(np->parent, pmif->regbase, pmif->irq, hwif->index);
#endif /* CONFIG_PMAC_PBOOK */
#endif /* CONFIG_PMAC_MEDIABAY */
		pmif->mediabay = 1;
		pmif->mediabay = 1;
		if (!bidp)
		if (!bidp)
			pmif->aapl_bus_id = 1;
			pmif->aapl_bus_id = 1;
@@ -1382,10 +1382,10 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
	       hwif->index, model_name[pmif->kind], pmif->aapl_bus_id,
	       hwif->index, model_name[pmif->kind], pmif->aapl_bus_id,
	       pmif->mediabay ? " (mediabay)" : "", hwif->irq);
	       pmif->mediabay ? " (mediabay)" : "", hwif->irq);
			
			
#ifdef CONFIG_PMAC_PBOOK
#ifdef CONFIG_PMAC_MEDIABAY
	if (pmif->mediabay && check_media_bay_by_base(pmif->regbase, MB_CD) == 0)
	if (pmif->mediabay && check_media_bay_by_base(pmif->regbase, MB_CD) == 0)
		hwif->noprobe = 0;
		hwif->noprobe = 0;
#endif /* CONFIG_PMAC_PBOOK */
#endif /* CONFIG_PMAC_MEDIABAY */


	hwif->sg_max_nents = MAX_DCMDS;
	hwif->sg_max_nents = MAX_DCMDS;


Loading