/arch/powerpc/boot/ |
D | cuboot-hotfoot.c | 47 void *devp; in hotfoot_fixups() local 51 devp = finddevice("/plb/opb/serial@ef600300"); in hotfoot_fixups() 52 if (!devp) in hotfoot_fixups() 54 del_node(devp); in hotfoot_fixups() 56 devp = finddevice("/plb/opb/ethernet@ef600900"); in hotfoot_fixups() 57 if (!devp) in hotfoot_fixups() 59 del_node(devp); in hotfoot_fixups() 67 void *devp = finddevice("/plb/ebc/nor_flash@0"); in hotfoot_fixups() local 68 if (!devp) in hotfoot_fixups() 74 getprop(devp, "reg", regs, sizeof(regs)); in hotfoot_fixups() [all …]
|
D | serial.c | 87 void *devp; in serial_get_stdout_devp() local 91 devp = finddevice("/chosen"); in serial_get_stdout_devp() 92 if (devp == NULL) in serial_get_stdout_devp() 95 if (getprop(devp, "linux,stdout-path", path, MAX_PATH_LEN) > 0 || in serial_get_stdout_devp() 96 getprop(devp, "stdout-path", path, MAX_PATH_LEN) > 0) { in serial_get_stdout_devp() 97 devp = finddevice(path); in serial_get_stdout_devp() 98 if (devp == NULL) in serial_get_stdout_devp() 101 if ((getprop(devp, "device_type", devtype, sizeof(devtype)) > 0) in serial_get_stdout_devp() 103 return devp; in serial_get_stdout_devp() 114 void *devp; in serial_console_init() local [all …]
|
D | libfdt-wrapper.c | 37 #define devp_offset_find(devp) (((unsigned long)(devp))-1) argument 38 #define devp_offset(devp) (devp ? ((unsigned long)(devp))-1 : 0) argument 67 static int fdt_wrapper_getprop(const void *devp, const char *name, in fdt_wrapper_getprop() argument 73 p = fdt_getprop(fdt, devp_offset(devp), name, &len); in fdt_wrapper_getprop() 80 static int fdt_wrapper_setprop(const void *devp, const char *name, in fdt_wrapper_setprop() argument 85 rc = fdt_setprop(fdt, devp_offset(devp), name, buf, len); in fdt_wrapper_setprop() 88 rc = fdt_setprop(fdt, devp_offset(devp), name, buf, len); in fdt_wrapper_setprop() 94 static int fdt_wrapper_del_node(const void *devp) in fdt_wrapper_del_node() argument 96 return fdt_del_node(fdt, devp_offset(devp)); in fdt_wrapper_del_node() 99 static void *fdt_wrapper_get_parent(const void *devp) in fdt_wrapper_get_parent() argument [all …]
|
D | cuboot-85xx-cpm2.c | 22 void *devp; in platform_fixups() local 34 devp = find_node_by_devtype(NULL, "soc"); in platform_fixups() 35 if (devp) { in platform_fixups() 38 setprop(devp, "bus-frequency", &bd.bi_busfreq, in platform_fixups() 42 if (get_parent(serial) != devp) in platform_fixups() 50 devp = find_node_by_compatible(NULL, "fsl,cpm2-brg"); in platform_fixups() 51 if (devp) in platform_fixups() 52 setprop(devp, "clock-frequency", &bd.bi_brgfreq, in platform_fixups()
|
D | ebony.c | 36 void *devp; in ebony_flashsel_fixup() local 41 devp = finddevice(EBONY_FPGA_PATH); in ebony_flashsel_fixup() 42 if (!devp) in ebony_flashsel_fixup() 45 if (getprop(devp, "virtual-reg", &fpga, sizeof(fpga)) != sizeof(fpga)) in ebony_flashsel_fixup() 51 devp = finddevice(EBONY_SMALL_FLASH_PATH); in ebony_flashsel_fixup() 52 if (!devp) in ebony_flashsel_fixup() 56 if (getprop(devp, "reg", reg, sizeof(reg)) != sizeof(reg)) in ebony_flashsel_fixup() 64 setprop(devp, "reg", reg, sizeof(reg)); in ebony_flashsel_fixup()
|
D | ops.h | 88 int ns16550_console_init(void *devp, struct serial_console_data *scdp); 89 int cpm_console_init(void *devp, struct serial_console_data *scdp); 90 int mpc5200_psc_console_init(void *devp, struct serial_console_data *scdp); 91 int opal_console_init(void *devp, struct serial_console_data *scdp); 106 static inline int getprop(void *devp, const char *name, void *buf, int buflen) in getprop() argument 108 return (dt_ops.getprop) ? dt_ops.getprop(devp, name, buf, buflen) : -1; in getprop() 111 static inline int setprop(void *devp, const char *name, in setprop() argument 114 return (dt_ops.setprop) ? dt_ops.setprop(devp, name, buf, buflen) : -1; in setprop() 116 #define setprop_val(devp, name, val) \ argument 119 setprop((devp), (name), &x, sizeof(x)); \ [all …]
|
D | mvme7100.c | 26 void *devp; in mvme7100_fixups() local 31 devp = finddevice("/soc@f1000000"); in mvme7100_fixups() 32 if (devp) in mvme7100_fixups() 33 setprop(devp, "bus-frequency", &busfreq, sizeof(busfreq)); in mvme7100_fixups() 35 devp = finddevice("/soc/serial@4500"); in mvme7100_fixups() 36 if (devp) in mvme7100_fixups() 37 setprop(devp, "clock-frequency", &busfreq, sizeof(busfreq)); in mvme7100_fixups()
|
D | treeboot-currituck.c | 61 void *devp = finddevice("/"); in ibm_currituck_fixups() local 66 while ((devp = find_node_by_devtype(devp, "pci"))) { in ibm_currituck_fixups() 67 if (getprop(devp, "dma-ranges", dma_ranges, sizeof(dma_ranges)) < 0) { in ibm_currituck_fixups() 75 setprop(devp, "dma-ranges", dma_ranges, sizeof(dma_ranges)); in ibm_currituck_fixups()
|
D | devtree.c | 65 void *devp = NULL; in dt_fixup_cpu_clocks() local 72 while ((devp = find_node_by_devtype(devp, "cpu"))) { in dt_fixup_cpu_clocks() 73 setprop_val(devp, "clock-frequency", cpu_to_be32(cpu)); in dt_fixup_cpu_clocks() 74 setprop_val(devp, "timebase-frequency", cpu_to_be32(tb)); in dt_fixup_cpu_clocks() 76 setprop_val(devp, "bus-frequency", cpu_to_be32(bus)); in dt_fixup_cpu_clocks() 84 void *devp = finddevice(path); in dt_fixup_clock() local 86 if (devp) { in dt_fixup_clock() 88 setprop_val(devp, "clock-frequency", cpu_to_be32(freq)); in dt_fixup_clock() 94 void *devp = find_node_by_alias(alias); in dt_fixup_mac_address_by_alias() local 96 if (devp) { in dt_fixup_mac_address_by_alias() [all …]
|
D | ofconsole.c | 21 void *devp; in of_console_open() local 23 if (((devp = of_finddevice("/chosen")) != NULL) in of_console_open() 24 && (of_getprop(devp, "stdout", &of_stdout_handle, in of_console_open()
|
D | ns16550.c | 57 int ns16550_console_init(void *devp, struct serial_console_data *scdp) in ns16550_console_init() argument 62 if (dt_get_virtual_reg(devp, (void **)®_base, 1) < 1) { in ns16550_console_init() 67 n = getprop(devp, "reg-offset", ®_offset, sizeof(reg_offset)); in ns16550_console_init() 71 n = getprop(devp, "reg-shift", ®_shift, sizeof(reg_shift)); in ns16550_console_init()
|
D | ugecon.c | 109 void *devp; in ug_grab_exi_io_base() local 111 devp = find_node_by_compatible(NULL, "nintendo,flipper-exi"); in ug_grab_exi_io_base() 112 if (devp == NULL) in ug_grab_exi_io_base() 114 if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v)) in ug_grab_exi_io_base()
|
D | cpm-serial.c | 199 int cpm_console_init(void *devp, struct serial_console_data *scdp) in cpm_console_init() argument 208 if (dt_is_compatible(devp, "fsl,cpm1-smc-uart")) { in cpm_console_init() 210 } else if (dt_is_compatible(devp, "fsl,cpm2-scc-uart")) { in cpm_console_init() 212 } else if (dt_is_compatible(devp, "fsl,cpm2-smc-uart")) { in cpm_console_init() 230 if (getprop(devp, "fsl,cpm-command", &cpm_cmd, 4) < 4) in cpm_console_init() 233 if (dt_get_virtual_reg(devp, vreg, 2) < 2) in cpm_console_init() 243 parent = get_parent(devp); in cpm_console_init()
|
D | opal.c | 80 int opal_console_init(void *devp, struct serial_console_data *scdp) in opal_console_init() argument 84 if (devp) { in opal_console_init() 85 int n = getprop(devp, "reg", &opal_con_id, sizeof(u32)); in opal_console_init()
|
D | mpc52xx-psc.c | 53 int mpc5200_psc_console_init(void *devp, struct serial_console_data *scdp) in mpc5200_psc_console_init() argument 56 if (dt_get_virtual_reg(devp, &psc, 1) < 1) in mpc5200_psc_console_init()
|
D | 4xx.c | 170 void *devp; in ibm4xx_denali_get_cs() local 174 devp = finddevice("/"); in ibm4xx_denali_get_cs() 175 if (!devp) in ibm4xx_denali_get_cs() 178 if (getprop(devp, "model", model, sizeof(model)) <= 0) in ibm4xx_denali_get_cs() 305 void *devp; in ibm4xx_fixup_ebc_ranges() local 323 devp = finddevice(ebc); in ibm4xx_fixup_ebc_ranges() 324 if (! devp) in ibm4xx_fixup_ebc_ranges() 327 setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32)); in ibm4xx_fixup_ebc_ranges()
|