lite5200.c (75ca399e82726fba877f3cce7ee49c13b43efd67) | lite5200.c (66ffbe490b6156898364b3f20a571a78f8d77bc8) |
---|---|
1/* 2 * Freescale Lite5200 board support 3 * 4 * Written by: Grant Likely <grant.likely@secretlab.ca> 5 * 6 * Copyright (C) Secret Lab Technologies Ltd. 2006. All rights reserved. 7 * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved. 8 * --- 18 unchanged lines hidden (view full) --- 27#include <asm/mpc52xx.h> 28 29/* ************************************************************************ 30 * 31 * Setup the architecture 32 * 33 */ 34 | 1/* 2 * Freescale Lite5200 board support 3 * 4 * Written by: Grant Likely <grant.likely@secretlab.ca> 5 * 6 * Copyright (C) Secret Lab Technologies Ltd. 2006. All rights reserved. 7 * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved. 8 * --- 18 unchanged lines hidden (view full) --- 27#include <asm/mpc52xx.h> 28 29/* ************************************************************************ 30 * 31 * Setup the architecture 32 * 33 */ 34 |
35/* mpc5200 device tree match tables */ 36static struct of_device_id mpc5200_cdm_ids[] __initdata = { 37 { .compatible = "fsl,mpc5200-cdm", }, 38 { .compatible = "mpc5200-cdm", }, 39 {} 40}; 41 42static struct of_device_id mpc5200_gpio_ids[] __initdata = { 43 { .compatible = "fsl,mpc5200-gpio", }, 44 { .compatible = "mpc5200-gpio", }, 45 {} 46}; 47 |
|
35/* 36 * Fix clock configuration. 37 * 38 * Firmware is supposed to be responsible for this. If you are creating a 39 * new board port, do *NOT* duplicate this code. Fix your boot firmware 40 * to set it correctly in the first place 41 */ 42static void __init 43lite5200_fix_clock_config(void) 44{ 45 struct device_node *np; 46 struct mpc52xx_cdm __iomem *cdm; | 48/* 49 * Fix clock configuration. 50 * 51 * Firmware is supposed to be responsible for this. If you are creating a 52 * new board port, do *NOT* duplicate this code. Fix your boot firmware 53 * to set it correctly in the first place 54 */ 55static void __init 56lite5200_fix_clock_config(void) 57{ 58 struct device_node *np; 59 struct mpc52xx_cdm __iomem *cdm; |
47 | |
48 /* Map zones */ | 60 /* Map zones */ |
49 np = of_find_compatible_node(NULL, NULL, "mpc5200-cdm"); | 61 np = of_find_matching_node(NULL, mpc5200_cdm_ids); |
50 cdm = of_iomap(np, 0); 51 of_node_put(np); 52 if (!cdm) { 53 printk(KERN_ERR "%s() failed; expect abnormal behaviour\n", 54 __FUNCTION__); 55 return; 56 } 57 --- 18 unchanged lines hidden (view full) --- 76 */ 77static void __init 78lite5200_fix_port_config(void) 79{ 80 struct device_node *np; 81 struct mpc52xx_gpio __iomem *gpio; 82 u32 port_config; 83 | 62 cdm = of_iomap(np, 0); 63 of_node_put(np); 64 if (!cdm) { 65 printk(KERN_ERR "%s() failed; expect abnormal behaviour\n", 66 __FUNCTION__); 67 return; 68 } 69 --- 18 unchanged lines hidden (view full) --- 88 */ 89static void __init 90lite5200_fix_port_config(void) 91{ 92 struct device_node *np; 93 struct mpc52xx_gpio __iomem *gpio; 94 u32 port_config; 95 |
84 np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio"); | 96 np = of_find_matching_node(NULL, mpc5200_gpio_ids); |
85 gpio = of_iomap(np, 0); 86 of_node_put(np); 87 if (!gpio) { 88 printk(KERN_ERR "%s() failed. expect abnormal behavior\n", 89 __FUNCTION__); 90 return; 91 } 92 --- 95 unchanged lines hidden --- | 97 gpio = of_iomap(np, 0); 98 of_node_put(np); 99 if (!gpio) { 100 printk(KERN_ERR "%s() failed. expect abnormal behavior\n", 101 __FUNCTION__); 102 return; 103 } 104 --- 95 unchanged lines hidden --- |