From: Stephen Rothwell This patch removes some unused stuff from PPC64 iSeries: - asm-ppc64/iSeries/iSeries_VpdInfo.h - iSeries_GetLocationData() - LocationData structure - device_Location() Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton --- /dev/null | 56 ------------------------ 25-akpm/arch/ppc64/kernel/iSeries_VpdInfo.c | 37 --------------- 25-akpm/include/asm-ppc64/iSeries/iSeries_pci.h | 18 ------- 3 files changed, 111 deletions(-) diff -puN arch/ppc64/kernel/iSeries_VpdInfo.c~ppc64-remove-some-unused-iseries-functions arch/ppc64/kernel/iSeries_VpdInfo.c --- 25/arch/ppc64/kernel/iSeries_VpdInfo.c~ppc64-remove-some-unused-iseries-functions 2005-01-18 21:59:36.920127952 -0800 +++ 25-akpm/arch/ppc64/kernel/iSeries_VpdInfo.c 2005-01-18 21:59:36.926127040 -0800 @@ -36,7 +36,6 @@ #include #include #include -//#include #include #include "pci.h" @@ -85,30 +84,6 @@ typedef struct SlotMapStruct SlotMap; #define SLOT_ENTRY_SIZE 16 /* - * Bus, Card, Board, FrameId, CardLocation. - */ -LocationData* iSeries_GetLocationData(struct pci_dev *PciDev) -{ - struct iSeries_Device_Node *DevNode = - (struct iSeries_Device_Node *)PciDev->sysdata; - LocationData *LocationPtr = - (LocationData *)kmalloc(LOCATION_DATA_SIZE, GFP_KERNEL); - - if (LocationPtr == NULL) { - printk("PCI: LocationData area allocation failed!\n"); - return NULL; - } - memset(LocationPtr, 0, LOCATION_DATA_SIZE); - LocationPtr->Bus = ISERIES_BUS(DevNode); - LocationPtr->Board = DevNode->Board; - LocationPtr->FrameId = DevNode->FrameId; - LocationPtr->Card = PCI_SLOT(DevNode->DevFn); - strcpy(&LocationPtr->CardLocation[0], &DevNode->CardLocation[0]); - return LocationPtr; -} -EXPORT_SYMBOL(iSeries_GetLocationData); - -/* * Formats the device information. * - Pass in pci_dev* pointer to the device. * - Pass in buffer to place the data. Danger here is the buffer must @@ -149,18 +124,6 @@ int iSeries_Device_Information(struct pc } /* - * Build a character string of the device location, Frame 1, Card C10 - */ -int device_Location(struct pci_dev *PciDev, char *BufPtr) -{ - struct iSeries_Device_Node *DevNode = - (struct iSeries_Device_Node *)PciDev->sysdata; - return sprintf(BufPtr, "PCI: Bus%3d, AgentId%3d, Vendor %04X, Location %s", - DevNode->DsaAddr.Dsa.busNumber, DevNode->AgentId, - DevNode->Vendor, DevNode->Location); -} - -/* * Parse the Slot Area */ void iSeries_Parse_SlotArea(SlotMap *MapPtr, int MapLen, diff -puN include/asm-ppc64/iSeries/iSeries_pci.h~ppc64-remove-some-unused-iseries-functions include/asm-ppc64/iSeries/iSeries_pci.h --- 25/include/asm-ppc64/iSeries/iSeries_pci.h~ppc64-remove-some-unused-iseries-functions 2005-01-18 21:59:36.921127800 -0800 +++ 25-akpm/include/asm-ppc64/iSeries/iSeries_pci.h 2005-01-18 21:59:36.928126736 -0800 @@ -102,27 +102,9 @@ struct iSeries_Device_Node { }; /************************************************************************/ -/* Location Data extracted from the VPD list and device info. */ -/************************************************************************/ - -struct LocationDataStruct { /* Location data structure for device */ - u16 Bus; /* iSeries Bus Number 0x00*/ - u16 Board; /* iSeries Board 0x02*/ - u8 FrameId; /* iSeries spcn Frame Id 0x04*/ - u8 PhbId; /* iSeries Phb Location 0x05*/ - u8 AgentId; /* iSeries AgentId 0x06*/ - u8 Card; - char CardLocation[4]; -}; - -typedef struct LocationDataStruct LocationData; -#define LOCATION_DATA_SIZE 48 - -/************************************************************************/ /* Functions */ /************************************************************************/ -extern LocationData* iSeries_GetLocationData(struct pci_dev* PciDev); extern int iSeries_Device_Information(struct pci_dev*,char*, int); extern void iSeries_Get_Location_Code(struct iSeries_Device_Node*); extern int iSeries_Device_ToggleReset(struct pci_dev* PciDev, int AssertTime, int DelayTime); diff -L include/asm-ppc64/iSeries/iSeries_VpdInfo.h -puN include/asm-ppc64/iSeries/iSeries_VpdInfo.h~ppc64-remove-some-unused-iseries-functions /dev/null --- 25/include/asm-ppc64/iSeries/iSeries_VpdInfo.h +++ /dev/null 2003-09-15 06:40:47.000000000 -0700 @@ -1,56 +0,0 @@ -#ifndef _ISERIES_VPDINFO_H -#define _ISERIES_VPDINFO_H -/************************************************************************/ -/* File iSeries_VpdInfo.h created by Allan Trautman Feb 08 2001. */ -/************************************************************************/ -/* This code supports the location data fon on the IBM iSeries systems. */ -/* Copyright (C) 20yy */ -/* */ -/* This program is free software; you can redistribute it and/or modify */ -/* it under the terms of the GNU General Public License as published by */ -/* the Free Software Foundation; either version 2 of the License, or */ -/* (at your option) any later version. */ -/* */ -/* 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 */ -/************************************************************************/ -/* Change Activity: */ -/* Created, Feg 8, 2001 */ -/* Reformated for Card, March 8, 2001 */ -/* End Change Activity */ -/************************************************************************/ - -struct pci_dev; /* Forward Declare */ -/************************************************************************/ -/* Location Data extracted from the VPD list and device info. */ -/************************************************************************/ -struct LocationDataStruct { /* Location data structure for device */ - u16 Bus; /* iSeries Bus Number 0x00*/ - u16 Board; /* iSeries Board 0x02*/ - u8 FrameId; /* iSeries spcn Frame Id 0x04*/ - u8 PhbId; /* iSeries Phb Location 0x05*/ - u16 Card; /* iSeries Card Slot 0x06*/ - char CardLocation[4]; /* Char format of planar vpd 0x08*/ - u8 AgentId; /* iSeries AgentId 0x0C*/ - u8 SecondaryAgentId; /* iSeries Secondary Agent Id 0x0D*/ - u8 LinuxBus; /* Linux Bus Number 0x0E*/ - u8 LinuxDevFn; /* Linux Device Function 0x0F*/ -}; -typedef struct LocationDataStruct LocationData; -#define LOCATION_DATA_SIZE 16 - -/************************************************************************/ -/* Protypes */ -/************************************************************************/ -extern LocationData* iSeries_GetLocationData(struct pci_dev* PciDev); -extern int iSeries_Device_Information(struct pci_dev*,char*, int); - -#endif /* _ISERIES_VPDINFO_H */ _