initial commit with v2.6.9
[linux-2.6.9-moxart.git] / arch / ppc / platforms / tqm8260_setup.c
bloba8880bfc034b2ac05da5392e16e4c247258b734a
1 /*
2 * arch/ppc/platforms/tqm8260_setup.c
4 * TQM8260 platform support
6 * Author: Allen Curtis <acurtis@onz.com>
7 * Derived from: m8260_setup.c by Dan Malek, MVista
9 * Copyright 2002 Ones and Zeros, Inc.
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
17 #include <linux/init.h>
19 #include <asm/immap_cpm2.h>
20 #include <asm/mpc8260.h>
21 #include <asm/machdep.h>
23 static int
24 tqm8260_set_rtc_time(unsigned long time)
26 ((cpm2_map_t *)CPM_MAP_ADDR)->im_sit.sit_tmcnt = time;
27 ((cpm2_map_t *)CPM_MAP_ADDR)->im_sit.sit_tmcntsc = 0x3;
29 return(0);
32 static unsigned long
33 tqm8260_get_rtc_time(void)
35 return ((cpm2_map_t *)CPM_MAP_ADDR)->im_sit.sit_tmcnt;
38 void __init
39 m82xx_board_init(void)
41 /* Anything special for this platform */
42 ppc_md.set_rtc_time = tqm8260_set_rtc_time;
43 ppc_md.get_rtc_time = tqm8260_get_rtc_time;