[PATCH] powerpc: consolidate mpc83xx platform files

Joakim Tjernlund joakim.tjernlund at transmode.se
Tue Dec 19 01:44:14 EST 2006


[SNIP]

> Something like this should work just as well. Seems to work fine on my
> system here (that has a DS1338, i.e. ds1307 driver).
> 
> Let me know if it works on 83xx and I'll post it with a 
> signed-off-line.
> 
> 
> 
> -Olof
> 
> 
> 
> 
> Index: linux-2.6/arch/powerpc/Kconfig
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/Kconfig
> +++ linux-2.6/arch/powerpc/Kconfig
> @@ -600,6 +600,12 @@ config PPC_TODC
>  	---help---
>  	  This adds support for many TODC/RTC chips.
>  
> +config PPC_GENRTC
> +	bool "Generic RTC support"
> +	help
> +	  This adds support for using regular RTC registered 
> with the RTC
> +	  framework as the main clock on powerpc.
> +
>  endmenu
>  
>  source arch/powerpc/platforms/embedded6xx/Kconfig
> Index: linux-2.6/arch/powerpc/sysdev/Makefile
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/sysdev/Makefile
> +++ linux-2.6/arch/powerpc/sysdev/Makefile
> @@ -10,6 +10,7 @@ obj-$(CONFIG_40x)		+= dcr.o
>  obj-$(CONFIG_U3_DART)		+= dart_iommu.o
>  obj-$(CONFIG_MMIO_NVRAM)	+= mmio_nvram.o
>  obj-$(CONFIG_FSL_SOC)		+= fsl_soc.o
> +obj-$(CONFIG_PPC_GENRTC)	+= genrtc.o
>  obj-$(CONFIG_PPC_TODC)		+= todc.o
>  obj-$(CONFIG_TSI108_BRIDGE)	+= tsi108_pci.o tsi108_dev.o
>  obj-$(CONFIG_QUICC_ENGINE)	+= qe_lib/
> Index: linux-2.6/arch/powerpc/sysdev/genrtc.c
> ===================================================================
> --- /dev/null
> +++ linux-2.6/arch/powerpc/sysdev/genrtc.c
> @@ -0,0 +1,77 @@
> +/*
> + * Copyright (C) Olof Johansson <olof at lixom.net>
> + *
> + * This program is free software; you can redistribute it 
> and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  
> 02111-1307 USA
> + */
> +
> +#include <linux/time.h>
> +#include <linux/device.h>
> +#include <linux/rtc.h>
> +
> +#include <asm/machdep.h>
> +#include <asm/time.h>
> +
> +static struct class_device *rtc_dev;
> +
> +static void genrtc_set_rtc_time_work(void *arg);
> +
> +static struct rtc_time delayed_tm;
> +static struct workqueue_struct *rtc_workqueue;
> +static DECLARE_WORK(rtc_work, genrtc_set_rtc_time_work, &delayed_tm);

The workqueue stuff has changed and needs to be adapted. Don't know how
yet though. If you figure it out, drop a line.

 Jocke
[SNIP]



More information about the Linuxppc-dev mailing list