Path: blob/master/arch/powerpc/platforms/44x/sam440ep.c
26481 views
// SPDX-License-Identifier: GPL-2.0-or-later1/*2* Sam440ep board specific routines based off bamboo.c code3* original copyrights below4*5* Wade Farnsworth <[email protected]>6* Copyright 2004 MontaVista Software Inc.7*8* Rewritten and ported to the merged powerpc tree:9* Josh Boyer <[email protected]>10* Copyright 2007 IBM Corporation11*12* Modified from bamboo.c for sam440ep:13* Copyright 2008 Giuseppe Coviello <[email protected]>14*/15#include <linux/init.h>16#include <linux/of_platform.h>1718#include <asm/machdep.h>19#include <asm/udbg.h>20#include <asm/time.h>21#include <asm/uic.h>22#include <asm/pci-bridge.h>23#include <asm/ppc4xx.h>24#include <linux/i2c.h>2526static const struct of_device_id sam440ep_of_bus[] __initconst = {27{ .compatible = "ibm,plb4", },28{ .compatible = "ibm,opb", },29{ .compatible = "ibm,ebc", },30{},31};3233static int __init sam440ep_device_probe(void)34{35of_platform_bus_probe(NULL, sam440ep_of_bus, NULL);3637return 0;38}39machine_device_initcall(sam440ep, sam440ep_device_probe);4041static int __init sam440ep_probe(void)42{43pci_set_flags(PCI_REASSIGN_ALL_RSRC);4445return 1;46}4748define_machine(sam440ep) {49.name = "Sam440ep",50.compatible = "acube,sam440ep",51.probe = sam440ep_probe,52.progress = udbg_progress,53.init_IRQ = uic_init_tree,54.get_irq = uic_get_irq,55.restart = ppc4xx_reset_system,56};5758static struct i2c_board_info sam440ep_rtc_info = {59.type = "m41st85",60.addr = 0x68,61.irq = -1,62};6364static int __init sam440ep_setup_rtc(void)65{66return i2c_register_board_info(0, &sam440ep_rtc_info, 1);67}68machine_device_initcall(sam440ep, sam440ep_setup_rtc);697071