aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fdt
Commit message (Collapse)AuthorAgeFilesLines
* MFC r281371: Use OF_getencpropalloc() to handle endianess of the properties.Ian Lepore2015-05-241-3/+3
| | | | Notes: svn path=/stable/10/; revision=283485
* MFC r279368, r280772, r280848:Ian Lepore2015-05-242-67/+169
| | | | | | | | | | | Allow creating subclass of FDT simplebus Make simplebus a base class of ofwbus. Fix bug in xrefinfo_find() for 64-bit platforms Notes: svn path=/stable/10/; revision=283477
* MFC r277098, r279235:Ian Lepore2015-05-231-30/+1
| | | | | | | | | Introduce ofw_bus_reg_to_rl() to replace part of common bus code Fix endianness on FDT read in ARM GIC Notes: svn path=/stable/10/; revision=283334
* MFC r277655, r277989: Reimplement fdt_clock_register_provider() correctly.Ian Lepore2015-02-131-1/+2
| | | | Notes: svn path=/stable/10/; revision=278734
* MFC r274412, r274413, r274414: Bugfixes for imx5/6 pinctrl driver.Ian Lepore2014-12-271-6/+5
| | | | Notes: svn path=/stable/10/; revision=276275
* MFC r273282: Fail to probe on simplebus nodes that lack a "ranges" property.Ian Lepore2014-10-261-1/+7
| | | | Notes: svn path=/stable/10/; revision=273678
* MFC r272109, r272181:Ian Lepore2014-10-263-72/+2
| | | | | | | | | | | | Replace multiple nearly-identical copies of code to walk through an FDT node's interrupts=<...> property creating resource list entries with a single common implementation. This change makes ofw_bus_intr_to_rl() the one true copy of that code and removes the copies of it from other places. This also adds handling of the interrupts-extended property. Notes: svn path=/stable/10/; revision=273675
* MFC 271546:Ian Lepore2014-10-263-0/+256
| | | | | | | | Create an interface and support routines for drivers that handle IO pin multiplexing and configuration based on FDT data. Notes: svn path=/stable/10/; revision=273669
* MFC r270957, r270959:Ian Lepore2014-10-263-0/+297
| | | | | | | | Create an interface for drivers to enable or disable their clocks as listed in the clocks=<...> properties of their FDT data. Notes: svn path=/stable/10/; revision=273657
* MFC r270945:Ian Lepore2014-10-262-3/+3
| | | | | | | | Rename OF_xref_phandle() to OF_node_from_xref() and add a new function that provides the inverse translation, OF_xref_from_node(). Notes: svn path=/stable/10/; revision=273652
* MFC r269594, r269596, r269597, r269598, r269605, r269606:Ian Lepore2014-08-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Set ofwbus and simplebus to attach during BUS_PASS_BUS. Define names that drivers can use to adjust their position relative to other drivers within a BUS_PASS Adjust ofwbus and simplebus to attach at BUS_PASS_ORDER_MIDDLE, so that a platform can attach some other bus first if necessary. Set the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU. Attach arm generic interrupt and timer drivers in the middle of BUS_PASS_INTERRUPT and BUS_PASS_TIMER, respectively. Add an arm option, ARM_DEVICE_MULTIPASS, used to opt-in to multi-pass device attachment on arm platforms. If this is defined, nexus attaches early in BUS_PASS_BUS, and other busses and devices attach later, in the pass number they are set up for. Without it defined, nexus attaches in BUS_PASS_DEFAULT and thus so does everything else, which is status quo. Notes: svn path=/stable/10/; revision=270075
* MFC r261938, r261939, r261940, r261944, r261945, r261946, r261947, r261956, ↵Ian Lepore2014-05-152-5/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r261957, r261983, r261094, r261955, r261958, Add a driver to provide access to imx6 on-chip one-time-programmble data. Make it possible to access the ocotp registers before the ocotp device is attached, by establishing a temporary mapping of the registers when necessary. It turns out Freescale cleverly made the ocotp device compatible across several different families of SoCs, so move it to the freescale directory and prefix everything with fsl rather than imx6. Convert the imx6 sdhci "R1B fix" from a busy-loop in the interrupt handler to a callout. Increase the wait time for acquiring the SD bus from 10 to 250ms. If no compatible cards were found after probing the SD bus, say so. Add timeout logic to sdhci, separate from the timeouts done by the hardware. After a timeout, reset the controller using SDHCI_RESET_CMD|SDHCI_RESET_DATA rather than SDHCI_RESET_ALL; the latter turns off clocks and power, removing any possibility of recovering from the error. Add a helper routine to depth-search the device tree for a node with a matching 'compatible' property. Notes: svn path=/stable/10/; revision=266200
* MFC r261681, r261682, r261683, r261684, r261685, r261686, r261687, r261688,Ian Lepore2014-05-151-4/+11
| | | | | | | | | | | | | | | | | | r261689, r261690, r261783, r261791, r261836, r261837, r261841, Add FDT matching code to AT91 device drivers. Better nomatch messages: include compat string. Also, flag devices as disabled in the successful probe message, but leave what that means to the actual driver (no semantic changes). Fix Embest board name and id. Honor the disabled status by only grabbing resources and returning when running under FDT in the AT91 SPI driver. Notes: svn path=/stable/10/; revision=266196
* MFC r261423, r261424, r261516, r261513, r261562, r261563, r261564, r261565,Ian Lepore2014-05-152-92/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r261596, r261606 Add the imx sdhci controller. Move Open Firmware device root on PowerPC, ARM, and MIPS systems to a sub-node of nexus (ofwbus) rather than direct attach under nexus. This fixes FDT on x86 and will make coexistence with ACPI on ARM systems easier. SPARC is unchanged. Add the missing ')' at end of sentence. Reword it to use a more common idiom. Pass the kernel physical address to initarm through the boot param struct. Make functions only used in vfp.c static, and remove vfp_enable. Fix __syscall on armeb EABI. As it returns a 64-bit value it needs to place 32-bit data in r1, not r0. 64-bit data is already packed correctly. Use abp_physaddr for the physical address over KERNPHYSADDR. This helps us remove the need to load the kernel at a fixed address. Remove references to PHYSADDR where it's used only in debugging output. Dynamically generate the page table. This will allow us to detect the physical address we are loaded at to change the mapping. Notes: svn path=/stable/10/; revision=266160
* MFC r261410Ian Lepore2014-05-151-0/+3
| | | | | | | | Follow r261352 by updating all drivers which are children of simplebus to check the status property in their probe routines. Notes: svn path=/stable/10/; revision=266152
* MFC r261351, r261352, r261355, r261396, r261397, r261398, r261403, r261404,Ian Lepore2014-05-153-533/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | r261405 Open Firmware interrupt specifiers can consist of arbitrary-length byte strings and include arbitrary information (IRQ line/domain/sense). When the ofw_bus_map_intr() API was introduced, it assumed that, as on most systems, these were either 1 cell, containing an interrupt line, or 2, containing a line number plus a sense code. It turns out a non-negligible number of ARM systems use 3 (or even 4!) cells for interrupts, so make this more general. Provide a simpler and more standards-compliant simplebus implementation to get the Routerboard 800 up and running with the vendor device tree. This does not implement some BERI-specific features (which hopefully won't be necessary soon), so move the old code to mips/beri, with a higher attach priority when built, until MIPS interrupt domain support is rearranged. Allow nesting of simplebuses. Add a set of helpers (ofw_bus_get_status() and ofw_bus_status_okay()) to process "status" properties of OF nodes. Fix one remnant endian flaw in nexus. Notes: svn path=/stable/10/; revision=266128
* MFC r257738, r259202, r258410, r260288, r260292, r260294, r260320, r260323,Ian Lepore2014-05-145-261/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r260326, r260327, r260331, r260333, r260340, r260371, r260372, r260373, r260374, r260375 Add common bus_space tag definition shared for most supported ARMv6/v7 SoCs. Correct license statements to reflect the fact that these files were all derived from sys/arm/mv/bus_space.c. In pmap_unmapdev(), remember the size, and use that as an argument to kva_free(), or we'd end up always passing it a size of 0 In pmap_mapdev(), first check whether a static mapping exists, Convert TI static device mapping to use the new arm_devmap_add_entry(), Use the common armv6 fdt_bus_tag defintion for tegra instead of a local copy. Eliminate use of fdt_immr_addr(), it's not needed for tegra Convert lpc from using fdt_immr style to arm_devmap_add_entry() to make static device mappings. Retire machine/fdt.h as a header used by MI code, as its function is now obsolete. This involves the following pieces: - Remove it entirely on PowerPC, where it is not used by MD code either - Remove all references to machine/fdt.h in non-architecture-specific code (aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat non-arch-specific). - Fix code relying on header pollution from machine/fdt.h includes - Legacy fdtbus.c (still used on x86 FDT systems) now passes resource requests to its parent (nexus). This allows x86 FDT devices to allocate both memory and IO requests and removes the last notionally MI use of fdtbus_bs_tag. - On those architectures that retain a machine/fdt.h, unused bits like FDT_MAP_IRQ and FDT_INTR_MAX have been removed. Add #include <machine/fdt.h> to a few files that used to get it via pollution Enable the mv cesa security/crypto device by providing the required property in the dts source, and adding the right devices to the kernel config. Remove dev/fdt/fdt_pci.c, which was code specific to Marvell ARM SoCs, related to setting up static device mappings. Since it was only used by arm/mv/mv_pci.c, it's now just static functions within that file, plus one public function that gets called only from arm/mv/mv_machdep.c. Switch RPi to using arm_devmap_add_entry() to set up static device mapping. Allow 'no static device mappings' to potentially work. Don't try to find a static mapping before calling pmap_mapdev(), that logic is now part of pmap_mapdev() and doesn't need to be duplicated here. Switch a10 to using arm_devmap_add_entry() to set up static device mapping. Notes: svn path=/stable/10/; revision=266084
* MFC r260281, r260282, r260283, r260285Ian Lepore2014-05-146-226/+22
| | | | | | | | | | | | | | | | Implement OFW_BUS_MAP_INTR() in terms of the FDT PIC table Reimplement fdt_intr_to_rl() in terms of OFW_BUS_MAP_INTR() and OFW_BUS_CONFIG_INTR(). Use bus_space_map() rather than pmap_mapdev() in nexus_activate_resource(), when running on FDT systems. Unmap memory in nexus_deactivate_resource(). Remove fdt_pic_table code from MIPS, PowerPC, and x86, as it is no longer used by anything. Notes: svn path=/stable/10/; revision=266079
* MFC r258800, r258802, r258805, r258806, r258807, r258851, r258857,Ian Lepore2014-05-142-377/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r259199, r259484, r259513, r259514, r259516 The kernel stack guard pages are only below the stack pointer, not above. Remove unnecessary double-setting of the thread's onfault state in copyinstr(). Open Firmware mandates that certain cross-references, in particular those in /chosen, be ihandles. The ePAPR spec makes those cross-reference phandles, since FDT has no concept of ihandles. Have the OF FDT CI module interpret queries about ihandles as cross-reference phandles. Real OF systems have an ihandle under /chosen/stdout, not a phandle. Use the right type. Rearchitect platform memory map parsing to make it less Open Firmware-centric. Remove fdtbus_bs_tag definition, which is now obsolete. The remainder of this file is also slated for future demolition. Return the correct IEEE 1275 code for "nextprop". Use the common Open Firmware PCI interrupt routing code instead of the duplicate version in dev/fdt. Configure interrupt sense based on device tree information. Simplify the ofw_bus_lookup_imap() API slightly: make it allocate maskbuf internally instead of requiring the caller to allocate it. Notes: svn path=/stable/10/; revision=266020
* MFC r257702, r257745, r257746, r257747, r257751, r257791, r257793,Ian Lepore2014-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r257794, r257795, r257992 Teach nexus(4) about Open Firmware (e.g. FDT) on ARM and MIPS, retiring fdtbus in most cases. Make OF_nextprop() work correctly for FDT by using the libfdt fdt_next_property_offset() API. Do not panic if pmap_mincore() is called. An addendum: it is possible, though of questionable utility, for a node to have no properties at all. Add definition for the Atheros 8021 gigabit PHY. Consolidate Apple firmware hacks and improve them by switching on the presence of mac-io devices in the tree, which uniquely identifies Apple hardware. Allow OF_decode_addr() to also be able to map resources on big-endian devices. Make tsec work with the device tree present on the RB800. Be more flexible about which compatible strings to accept. This brings up the PCI Express bus on the RB800 using the firmware device tree. Rename the "bare" platform "mpc85xx", which is what it actually is, and add actual platform probing based on PVR. Notes: svn path=/stable/10/; revision=266000
* MFC r257114, r257118Ian Lepore2014-05-131-553/+9
| | | | | | | | | | | | Use common OFW root code to set up fdtbus. This is an almost purely negative diff that should improve reliability somewhat. There should be no differences in behavior -- please report any that crop up. This has been tested on ARM and PPC systems. Make sure to get the right node when looking up #interrupt-cells. Notes: svn path=/stable/10/; revision=265971
* MFC r256994, r257016, r257055, r257059, r257060, r257075Ian Lepore2014-05-131-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new interfaces to ofw_bus: - ofw_bus_map_intr() Maps an (iparent, IRQ) tuple to a system-global interrupt number in some platform dependent way. This is meant to be implemented as a replacement for [FDT_]MAP_IRQ() that is an MI interface that knows about the bus hierarchy. - ofw_bus_config_intr() Configures an interrupt (previously mapped) based on firmware sense flags. This replaces manual interpretation of the sense field in bus drivers and will, in a follow-up, allow that interpretation to be redirected to the PIC drivers where it belongs. This will eventually replace the tables in /sys/dev/fdt/fdt_ARCH.c The PowerPC/AIM code has been converted to use these globally, with an implementation in terms of MAP_IRQ() and powerpc_config_intr(), assuming OpenPIC, at the bus root in nexus(4). The ofw_bus_config_intr() will shortly be integrated into pic_if.m and bounced through nexus into the PIC tree. Factor out MI portions of the PowerPC nexus device into /sys/dev/ofw. The sparc64 driver will be modified to use this shortly. Allow PIC drivers to translate firmware sense codes for themselves. This is designed to replace the tables in dev/fdt/fdt_ARCH.c, but will not happen quite yet. Do not map IRQs twice. This fixes PowerPC/FDT systems with multiple PICs, which would try to treat the previously-mapped interrupts from fdt_decode_intr() as interrupt line numbers on the same parent PIC. Remove some of the code required for supporting ssm(4) on SPARC in favor of a more PowerPC/FDT-focused design. Whenever SPARC64 is integrated into this rework, this should be (trivially) revisited. Notes: svn path=/stable/10/; revision=265969
* MFC r256932, r256938, r256966, r256953, r256967, r256969, r257015:Ian Lepore2014-05-133-9/+7
| | | | | | | | | | | | Add a new function (OF_getencprop()) that undoes the transformation applied by encode-int. Specifically, it takes a set of 32-bit cell values and changes them to host byte order. Most non-string instances of OF_getprop() should be using this function, which is a no-op on big-endian platforms. Use the new function all over the place. Notes: svn path=/stable/10/; revision=265967
* MFC r256870, r256898, r256899, r256900 (by nwhitehorn):Ian Lepore2014-05-134-18/+23
| | | | | | | | | | | | | | | | | Standards-conformance and code deduplication: - Use bus reference phandles in place of FDT offsets as IRQ domain keys - Unify the identical macio/fdt/mambo OpenPIC drivers into one - Be more forgiving (following ePAPR) about what we need from the device tree to identify an OpenPIC - Correctly map all IRQs into an interrupt domain - Set IRQ_*_CONFORM for interrupts on an unknown PIC type instead of failing attachment for that device. Allow lots of interrupts (useful on multi-domain platforms) and do not set device_quiet() on all devices attached under nexus(4). Notes: svn path=/stable/10/; revision=265959
* MFC r256798: Return BUS_PROBE_NOWILDCARD from fdtbus_probe.Ian Lepore2014-05-131-1/+1
| | | | Notes: svn path=/stable/10/; revision=265953
* MFC r257127:Luiz Otavio O Souza2014-01-231-3/+0
| | | | | | | | | | Remove all the instances of '#undef DEBUG' from kernel. Suggested by: rpaulo Approved by: adrian (mentor) Notes: svn path=/stable/10/; revision=261077
* MFC r257648, r257649, r257660:Ian Lepore2013-12-131-1/+4
| | | | | | | | | | | | | | | | | | | | Begin reducing code duplication in arm pmap.c and pmap-v6.c by factoring out common code related to mapping device memory into a new devmap.c file. Remove the growing duplication of code that used pmap_devmap_find_pa() and then did some math with the returned results to generate a virtual address, and likewise in reverse to get a physical address. Now there are a pair of functions, arm_devmap_vtop() and arm_devmap_ptov(), to do that. The bus_space_map() implementations are rewritten in terms of these. Move remaining code and data related to static device mapping into the new devmap.[ch] files. Emphasize the MD nature of these things by using the prefix arm_devmap_ on the function and type names (already a few of these things found their way into MI code, hopefully it will be harder to do by accident in the future). Notes: svn path=/stable/10/; revision=259364
* MFC r256911, r256936Brooks Davis2013-11-011-0/+19
| | | | | | | | | | | | | | | | | | | | | | | MFP4: 223121 (PIC portion), 225861, 227822, 229692 (PIC only), 229693, 230523, 1123614 Implement a driver for Robert Norton's PIC as an FDT interrupt controller. Devices whose interrupt-parent property points to a beripic device will have their interrupt allocation, activation, and setup operations routed through the IC rather than down the traditional bus hierarchy. This driver largely abstracts the underlying CPU away allowing the PIC to be implemented on CPU's other than BERI. Due to insufficient abstractions a small amount of MIPS specific code is currently required in fdt_mips.c and to implement counters. Sponsored by: DARPA/AFRL Approved by: re (gjb) Notes: svn path=/stable/10/; revision=257522
* MFC r256861:Brooks Davis2013-10-314-9/+392
| | | | | | | | | | | | | | | | MFP4: 223121 (FDT infrastructure portion) Implement support for interrupt-parent nodes in simplebus. The current implementation requires that device declarations have an interrupt-parent node and that it point to a device that has registered itself as a interrupt controller in fdt_ic_list_head and implements the fdt_ic interface. Sponsored by: DARPA/AFRL Approved by: re (gjb) Notes: svn path=/stable/10/; revision=257457
* Add basic support for FDT to i386 & amd64. This change includes:Marcel Moolenaar2013-05-211-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | 1. Common headers for fdt.h and ofw_machdep.h under x86/include with indirections under i386/include and amd64/include. 2. New modinfo for loader provided FDT blob. 3. Common x86_init_fdt() called from hammer_time() on amd64 and init386() on i386. 4. Split-off FDT specific low-level console functions from FDT bus methods for the uart(4) driver. The low-level console logic has been moved to uart_cpu_fdt.c and is used for arm, mips & powerpc only. The FDT bus methods are shared across all architectures. 5. Add dev/fdt/fdt_x86.c to hold the fdt_fixup_table[] and the fdt_pic_table[] arrays. Both are empty right now. FDT addresses are I/O ports on x86. Since the core FDT code does not handle different address spaces, adding support for both I/O ports and memory addresses requires some thought and discussion. It may be better to use a compile-time option that controls this. Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=250840
* Return "start" and "end" to u_long world. Because rman handle addresses asAleksandr Rybalko2013-03-191-4/+3
| | | | | | | | | | u_long too. Discussed with: ian@ Pointy hat to: ray@ Notes: svn path=/head/; revision=248509
* Cast "start" to u_long. Temporary fix to unbreak tinderbox.Aleksandr Rybalko2013-03-191-2/+2
| | | | | | | We need here max possible storage or dynamic, depend on size of address cell. Notes: svn path=/head/; revision=248502
* Don't hesitate to ask parent to setup IRQ finally.Aleksandr Rybalko2013-03-181-3/+0
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=248485
* Allow simplebus to attach to another simplebus.Aleksandr Rybalko2013-03-181-0/+2
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=248482
* Hide "no default resources for" warning under bootverbose. It's ok to useAleksandr Rybalko2013-03-181-2/+3
| | | | | | | | | optional resources. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=248481
* Allow simplebus to attach in less strict way, when "simple-bus" listed on notAleksandr Rybalko2013-03-181-2/+2
| | | | | | | | | | first position of compatible property, so simplebus driver can be generic driver for any bus listed as compatible with "simple-bus". Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=248480
* o Switch to use physical addresses in rman for FDT.Aleksandr Rybalko2013-03-183-10/+15
| | | | | | | | | o Remove vtophys used to translate virtual address to physical in case rman carry virtual. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=248467
* Bump per-device interrupt limit to more reasonable default.Oleksandr Tymoshenko2013-02-231-1/+1
| | | | | | | | | | | Some hardware like DMA and GPIO controllers might require more then 8 interrupts per device instance. Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp> Discussed with: gber@, raj@ Notes: svn path=/head/; revision=247207
* Merge Perforce changeset 219933 and portions of 219962 (omits changes toRobert Watson2013-01-121-2/+20
| | | | | | | | | | | | | | | | | | | | | unmerged BERI DTS files) to head: Use the OFW compatible string "mips,mips4k" rather than "mips4k,cp0" for interrupt control using MIPS4k CP0. Suggested by: thompsa Implement a MIPS FDT PIC decode routine to use when no PIC has been configured, which assumes a cascade back to the nexus bus (e.g., the on-board CP0 interrupt management parts on the MIPS). If the soc bus in a MIPS DTS file is declared as "mips4k,cp0"-compatible, then this will be enabled. This is sufficient to allow IRQs to be configured on BERI. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=245335
* When a partially initialised FDT-based device instance can't attach,Robert Watson2012-12-301-0/+2
| | | | | | | | | | | | perhaps due to an interrupt configuration problem, do not try to free device ivars that have not yet have been allocated. MFC after: 1 week Reviewed by: gonzo Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=244871
* Add fdt_get_reserved_regions function. API is simmilar to fdt_get_mem_regionsOleksandr Tymoshenko2012-11-302-0/+61
| | | | | | | | | It returns memory regions restricted from being used by kernel. These regions are dfined in "memreserve" property of root node in the same format as "reg" property of /memory node Notes: svn path=/head/; revision=243690
* If virtual addresses are not set use one to one mapping.Grzegorz Bernacki2012-09-141-2/+2
| | | | | | | | | Do not map memory and IO space at address 0. Obtained from: Semihalf Notes: svn path=/head/; revision=240487
* Add fdt_get_unit() function.Grzegorz Bernacki2012-09-142-0/+12
| | | | | | | Obtained from: Semihalf Notes: svn path=/head/; revision=240485
* Set busaddr and bussize to 0 when fdt_get_range() fails.Grzegorz Bernacki2012-09-141-1/+4
| | | | | | | Obtained from: Semihalf Notes: svn path=/head/; revision=240484
* Do not swap byte order if we assign default value for intr_cellsOleksandr Tymoshenko2012-08-251-1/+2
| | | | Notes: svn path=/head/; revision=239689
* Fix argument type for bus_space_mapOleksandr Tymoshenko2012-08-151-1/+1
| | | | Notes: svn path=/head/; revision=239309
* Merging of projects/armv6, part 4Oleksandr Tymoshenko2012-08-154-47/+66
| | | | | | | | | | | | | | | | | | | | r233822: Remove useless and wrong piece of code in fdt_get_range() which i overwrites passed phandle_t node. Modify debug printf in fdt_reg_to_rl() to be consistent (that is, print start and end *virtual* addresses). r230560: Handle "ranges;" Make fdt_reg_to_rl() responsible for mapping the device memory, instead on just hoping that there's only one simplebus, and using fdt_immr_va as the base VA. r230315 Add a function to get the PA from range, instead of (ab)using fdt_immr_pa, and use it for the UART driver Notes: svn path=/head/; revision=239274
* Simplify simplebus_setup_intr and don't call MD code directly. We canMarcel Moolenaar2012-07-021-25/+20
| | | | | | | (and have to) trust our parent to handle interrupt configuration. Notes: svn path=/head/; revision=238044
* Properly implement bus_setup_intr so that it handles the configurationMarcel Moolenaar2012-07-021-38/+33
| | | | | | | | | | | | | of interrupts of direct children. Have the bus_config_intr and bus_teardown_intr methods implemented by bus_generic_config_intr and bus_generic_teardown_intr (resp) as we don't need to do anything special outselves. This removes all the ``#ifdef $arch'' code that was there because powerpc didn't have a proper nexus and people tend to copy and paste stuff. Notes: svn path=/head/; revision=238043
* Preset (clear) the ranges we're supposed to fill from the FDT. If aMarcel Moolenaar2012-05-241-0/+8
| | | | | | | | particular range (either I/O memory or I/O port) is not defined in the FDT, we're not handing uninitialized structures back to our caller. Notes: svn path=/head/; revision=235930