Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (67 commits) [SCSI] SUNESP: Complete driver rewrite to version 2.0 [SPARC64]: Convert PCI over to generic struct iommu/strbuf. [SPARC]: device_node name constification fallout [SPARC64]: Convert SBUS over to generic iommu/strbuf structs. [SPARC64]: Add generic iommu and strbuf structs to iommu.h [SPARC64]: Consolidate {sbus,pci}_iommu_arena. [SPARC]: Make device_node name and type const [SPARC64]: constify some paramaters of OF routines [TIGON3]: of_get_property() returns const. [SPARC64]: Fix PCI rework to adhere to of_get_property() const return. [SPARC64]: Document and fix calculation of pages_avail. [SPARC64]: Make sure pbm->prom_node is setup easly enough in psycho.c [SPARC64]: Use bootmem_bootmap_pages() in choose_bootmap_pfn(). [SPARC64]: Add proper header file extern for cmdline_memory_size. [SPARC64]: Kill sparc_ultra_dump_{i,d}tlb() [SPARC64]: Use DECLARE_BITMAP and BITS_TO_LONGS in mm/init.c [SPARC64]: Give move verbose show_mem() output just like i386. [SPARC64]: Mark show_mem() printk's with KERN_INFO. [SPARC64]: Kill kvaddr_to_phys() and friends. [SPARC64]: Privatize sun4u_get_pte() and fix name. ...
This commit is contained in:
@@ -64,11 +64,9 @@
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
#ifdef __sparc__
|
||||
#ifdef CONFIG_SPARC
|
||||
#include <asm/idprom.h>
|
||||
#include <asm/openprom.h>
|
||||
#include <asm/oplib.h>
|
||||
#include <asm/pbm.h>
|
||||
#include <asm/prom.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PPC_PMAC
|
||||
@@ -2846,7 +2844,7 @@ static int gem_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if (!defined(__sparc__) && !defined(CONFIG_PPC_PMAC))
|
||||
#if (!defined(CONFIG_SPARC) && !defined(CONFIG_PPC_PMAC))
|
||||
/* Fetch MAC address from vital product data of PCI ROM. */
|
||||
static int find_eth_addr_in_vpd(void __iomem *rom_base, int len, unsigned char *dev_addr)
|
||||
{
|
||||
@@ -2901,36 +2899,19 @@ static void get_gem_mac_nonobp(struct pci_dev *pdev, unsigned char *dev_addr)
|
||||
|
||||
static int __devinit gem_get_device_address(struct gem *gp)
|
||||
{
|
||||
#if defined(__sparc__) || defined(CONFIG_PPC_PMAC)
|
||||
#if defined(CONFIG_SPARC) || defined(CONFIG_PPC_PMAC)
|
||||
struct net_device *dev = gp->dev;
|
||||
#endif
|
||||
|
||||
#if defined(__sparc__)
|
||||
struct pci_dev *pdev = gp->pdev;
|
||||
struct pcidev_cookie *pcp = pdev->sysdata;
|
||||
int use_idprom = 1;
|
||||
|
||||
if (pcp != NULL) {
|
||||
unsigned char *addr;
|
||||
int len;
|
||||
|
||||
addr = of_get_property(pcp->prom_node, "local-mac-address",
|
||||
&len);
|
||||
if (addr && len == 6) {
|
||||
use_idprom = 0;
|
||||
memcpy(dev->dev_addr, addr, 6);
|
||||
}
|
||||
}
|
||||
if (use_idprom)
|
||||
memcpy(dev->dev_addr, idprom->id_ethaddr, 6);
|
||||
#elif defined(CONFIG_PPC_PMAC)
|
||||
const unsigned char *addr;
|
||||
|
||||
addr = get_property(gp->of_node, "local-mac-address", NULL);
|
||||
if (addr == NULL) {
|
||||
#ifdef CONFIG_SPARC
|
||||
addr = idprom->id_ethaddr;
|
||||
#else
|
||||
printk("\n");
|
||||
printk(KERN_ERR "%s: can't get mac-address\n", dev->name);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
memcpy(dev->dev_addr, addr, 6);
|
||||
#else
|
||||
@@ -3088,7 +3069,7 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
|
||||
/* On Apple, we want a reference to the Open Firmware device-tree
|
||||
* node. We use it for clock control.
|
||||
*/
|
||||
#ifdef CONFIG_PPC_PMAC
|
||||
#if defined(CONFIG_PPC_PMAC) || defined(CONFIG_SPARC)
|
||||
gp->of_node = pci_device_to_OF_node(pdev);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user