Path: blob/master/arch/powerpc/platforms/44x/sam440ep.c
10820 views
/*1* Sam440ep board specific routines based off bamboo.c code2* original copyrights below3*4* Wade Farnsworth <[email protected]>5* Copyright 2004 MontaVista Software Inc.6*7* Rewritten and ported to the merged powerpc tree:8* Josh Boyer <[email protected]>9* Copyright 2007 IBM Corporation10*11* Modified from bamboo.c for sam440ep:12* Copyright 2008 Giuseppe Coviello <[email protected]>13*14* This program is free software; you can redistribute it and/or modify it15* under the terms of the GNU General Public License as published by the16* Free Software Foundation; either version 2 of the License, or (at your17* option) any later version.18*/19#include <linux/init.h>20#include <linux/of_platform.h>2122#include <asm/machdep.h>23#include <asm/prom.h>24#include <asm/udbg.h>25#include <asm/time.h>26#include <asm/uic.h>27#include <asm/pci-bridge.h>28#include <asm/ppc4xx.h>29#include <linux/i2c.h>3031static __initdata struct of_device_id sam440ep_of_bus[] = {32{ .compatible = "ibm,plb4", },33{ .compatible = "ibm,opb", },34{ .compatible = "ibm,ebc", },35{},36};3738static int __init sam440ep_device_probe(void)39{40of_platform_bus_probe(NULL, sam440ep_of_bus, NULL);4142return 0;43}44machine_device_initcall(sam440ep, sam440ep_device_probe);4546static int __init sam440ep_probe(void)47{48unsigned long root = of_get_flat_dt_root();4950if (!of_flat_dt_is_compatible(root, "acube,sam440ep"))51return 0;5253ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC);5455return 1;56}5758define_machine(sam440ep) {59.name = "Sam440ep",60.probe = sam440ep_probe,61.progress = udbg_progress,62.init_IRQ = uic_init_tree,63.get_irq = uic_get_irq,64.restart = ppc4xx_reset_system,65.calibrate_decr = generic_calibrate_decr,66};6768static struct i2c_board_info sam440ep_rtc_info = {69.type = "m41st85",70.addr = 0x68,71.irq = -1,72};7374static int sam440ep_setup_rtc(void)75{76return i2c_register_board_info(0, &sam440ep_rtc_info, 1);77}78machine_device_initcall(sam440ep, sam440ep_setup_rtc);798081