Commit c8b84976 authored by Stephen Rothwell's avatar Stephen Rothwell

powerpc: move iSeries_setup.[ch] and mf.c into platforms/iseries

iSeries_setup.c becomes setup.c
iSeries_setup.h becomes setup.h
mf.c retains its name

Also moved iSeries_[gs]et_rtc_time and iSeries_get_boot_time into
mf.c since they are just small wrappers around mf_ functions.
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
parent 2960eb66
obj-$(CONFIG_PPC_ISERIES) += hvcall.o hvlpconfig.o lpardata.o obj-y += hvcall.o hvlpconfig.o lpardata.o setup.o mf.o
/* /*
* mf.c
* Copyright (C) 2001 Troy D. Armstrong IBM Corporation * Copyright (C) 2001 Troy D. Armstrong IBM Corporation
* Copyright (C) 2004-2005 Stephen Rothwell IBM Corporation * Copyright (C) 2004-2005 Stephen Rothwell IBM Corporation
* *
...@@ -42,6 +41,10 @@ ...@@ -42,6 +41,10 @@
#include <asm/iSeries/HvLpConfig.h> #include <asm/iSeries/HvLpConfig.h>
#include <asm/iSeries/ItLpQueue.h> #include <asm/iSeries/ItLpQueue.h>
#include "setup.h"
extern int piranha_simulator;
/* /*
* This is the structure layout for the Machine Facilites LPAR event * This is the structure layout for the Machine Facilites LPAR event
* flows. * flows.
...@@ -1279,3 +1282,35 @@ static int __init mf_proc_init(void) ...@@ -1279,3 +1282,35 @@ static int __init mf_proc_init(void)
__initcall(mf_proc_init); __initcall(mf_proc_init);
#endif /* CONFIG_PROC_FS */ #endif /* CONFIG_PROC_FS */
/*
* Get the RTC from the virtual service processor
* This requires flowing LpEvents to the primary partition
*/
void iSeries_get_rtc_time(struct rtc_time *rtc_tm)
{
if (piranha_simulator)
return;
mf_get_rtc(rtc_tm);
rtc_tm->tm_mon--;
}
/*
* Set the RTC in the virtual service processor
* This requires flowing LpEvents to the primary partition
*/
int iSeries_set_rtc_time(struct rtc_time *tm)
{
mf_set_rtc(tm);
return 0;
}
void iSeries_get_boot_time(struct rtc_time *tm)
{
if (piranha_simulator)
return;
mf_get_boot_rtc(tm);
tm->tm_mon -= 1;
}
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
* Copyright (c) 2000 Mike Corrigan <mikejc@us.ibm.com> * Copyright (c) 2000 Mike Corrigan <mikejc@us.ibm.com>
* Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu> * Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
* *
* Module name: iSeries_setup.c
*
* Description: * Description:
* Architecture- / platform-specific boot-time initialization code for * Architecture- / platform-specific boot-time initialization code for
* the IBM iSeries LPAR. Adapted from original code by Grant Erickson and * the IBM iSeries LPAR. Adapted from original code by Grant Erickson and
...@@ -42,7 +40,6 @@ ...@@ -42,7 +40,6 @@
#include <asm/firmware.h> #include <asm/firmware.h>
#include <asm/time.h> #include <asm/time.h>
#include "iSeries_setup.h"
#include <asm/naca.h> #include <asm/naca.h>
#include <asm/paca.h> #include <asm/paca.h>
#include <asm/cache.h> #include <asm/cache.h>
...@@ -62,6 +59,8 @@ ...@@ -62,6 +59,8 @@
#include <asm/iSeries/ItVpdAreas.h> #include <asm/iSeries/ItVpdAreas.h>
#include <asm/iSeries/LparMap.h> #include <asm/iSeries/LparMap.h>
#include "setup.h"
extern void hvlog(char *fmt, ...); extern void hvlog(char *fmt, ...);
#ifdef DEBUG #ifdef DEBUG
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
* Copyright (c) 2000 Mike Corrigan <mikejc@us.ibm.com> * Copyright (c) 2000 Mike Corrigan <mikejc@us.ibm.com>
* Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu> * Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
* *
* Module name: as400_setup.h
*
* Description: * Description:
* Architecture- / platform-specific boot-time initialization code for * Architecture- / platform-specific boot-time initialization code for
* the IBM AS/400 LPAR. Adapted from original code by Grant Erickson and * the IBM AS/400 LPAR. Adapted from original code by Grant Erickson and
......
...@@ -22,8 +22,8 @@ pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o ...@@ -22,8 +22,8 @@ pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o
obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y) obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y)
obj-$(CONFIG_PPC_ISERIES) += iSeries_setup.o ItLpQueue.o hvCall.o \ obj-$(CONFIG_PPC_ISERIES) += ItLpQueue.o hvCall.o \
mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \ HvLpEvent.o iSeries_proc.o iSeries_htab.o \
iSeries_iommu.o iSeries_iommu.o
obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o
......
...@@ -43,11 +43,8 @@ ...@@ -43,11 +43,8 @@
#include <asm/time.h> #include <asm/time.h>
#include <asm/rtas.h> #include <asm/rtas.h>
#include <asm/iSeries/mf.h>
#include <asm/machdep.h> #include <asm/machdep.h>
extern int piranha_simulator;
/* /*
* We sponge a minor off of the misc major. No need slurping * We sponge a minor off of the misc major. No need slurping
* up another valuable major dev number for this. If you add * up another valuable major dev number for this. If you add
...@@ -265,40 +262,6 @@ static int rtc_read_proc(char *page, char **start, off_t off, ...@@ -265,40 +262,6 @@ static int rtc_read_proc(char *page, char **start, off_t off,
return len; return len;
} }
#ifdef CONFIG_PPC_ISERIES
/*
* Get the RTC from the virtual service processor
* This requires flowing LpEvents to the primary partition
*/
void iSeries_get_rtc_time(struct rtc_time *rtc_tm)
{
if (piranha_simulator)
return;
mf_get_rtc(rtc_tm);
rtc_tm->tm_mon--;
}
/*
* Set the RTC in the virtual service processor
* This requires flowing LpEvents to the primary partition
*/
int iSeries_set_rtc_time(struct rtc_time *tm)
{
mf_set_rtc(tm);
return 0;
}
void iSeries_get_boot_time(struct rtc_time *tm)
{
if ( piranha_simulator )
return;
mf_get_boot_rtc(tm);
tm->tm_mon -= 1;
}
#endif
#ifdef CONFIG_PPC_RTAS #ifdef CONFIG_PPC_RTAS
#define MAX_RTC_WAIT 5000 /* 5 sec */ #define MAX_RTC_WAIT 5000 /* 5 sec */
#define RTAS_CLOCK_BUSY (-2) #define RTAS_CLOCK_BUSY (-2)
......
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