powerpc: clean up empty lines in .c and .h files
Remove more needless <sys/tty.h> includesAs part of my journey to make it easy to determine what's relying on ttybits, remove a couple more. Some of these just outright didn't need it,while other
Remove more needless <sys/tty.h> includesAs part of my journey to make it easy to determine what's relying on ttybits, remove a couple more. Some of these just outright didn't need it,while others did rely on <sys/tty.h> pollution for mutex headers.
show more ...
add snps IP uart support / genaralize UARTThis is an amalgam of a patch by Doug Ambrisko togeneralize uart_acpi_find_device, imp moving theACPI table to uart_dev_ns8250.c and advice by jhbto wor
add snps IP uart support / genaralize UARTThis is an amalgam of a patch by Doug Ambrisko togeneralize uart_acpi_find_device, imp moving theACPI table to uart_dev_ns8250.c and advice by jhbto work around a bug in the EPYC 3151 BIOS(the BIOS incorrectly marks the serial ports asdisabled)Reviewed by: impMFC after: 8 weeksDifferential Revision: https://reviews.freebsd.org/D16432
Clean up OF_getprop_alloc APIOF_getprop_alloc takes element size argument and returns number ofelements in the property. There are valid use cases for such behaviorbut mostly API consumers pass 1
Clean up OF_getprop_alloc APIOF_getprop_alloc takes element size argument and returns number ofelements in the property. There are valid use cases for such behaviorbut mostly API consumers pass 1 as element size to get stringproperties. What API users would expect from OF_getprop_alloc is to bea combination of malloc + OF_getprop with the same semantic of returnvalue. This patch modifies API signature to match these expectations.For the valid use cases with element size != 1 and to reducemodification scope new OF_getprop_alloc_multi function has beenintroduced that behaves the same way OF_getprop_alloc behaved prior tothis patch.Reviewed by: ian, manuDifferential Revision: https://reviews.freebsd.org/D14850
sys/powerpc: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - e
sys/powerpc: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
Allow setting access-width for UART registers.This is required for FDT's standard "reg-io-width" property(similar to "reg-shift" property) found in many DTS files.This fixes operation on Altera
Allow setting access-width for UART registers.This is required for FDT's standard "reg-io-width" property(similar to "reg-shift" property) found in many DTS files.This fixes operation on Altera Arria 10 SOC Development Kit,where standard ns8250 uart allows 4-byte access only.Reviewed by: kan, marcelSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D9785
Use OF_prop_free instead of direct call to free(9)Reviewed by: jhibbits
powerpc: for pointers replace 0 with NULL.These are mostly cosmetical, no functional change.Found with devel/coccinelle.Reviewed by: jhibbits
Fix the resource_list_print_type() calls to use uintmax_t.Missed a bunch from r297000.
As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toinclude it explicitly when <vm/pmap.h> is already included.Reviewed by: alc, kibDifferential Revision: https://reviews.freebsd
As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toinclude it explicitly when <vm/pmap.h> is already included.Reviewed by: alc, kibDifferential Revision: https://reviews.freebsd.org/D5373
Convert rman to use rman_res_t instead of u_longSummary:Migrate to using the semi-opaque type rman_res_t to specify rman resources. Fornow, this is still compatible with u_long.This is step on
Convert rman to use rman_res_t instead of u_longSummary:Migrate to using the semi-opaque type rman_res_t to specify rman resources. Fornow, this is still compatible with u_long.This is step one in migrating rman to use uintmax_t for resources instead ofu_long.Going forward, this could feasibly be used to specify architecture-specificdefinitions of resource ranges, rather than baking a specific integer type intothe API.This change has been broken out to facilitate MFC'ing drivers back to 10 withoutbreaking ABI.Reviewed By: jhbSponsored by: Alex Perez/Inertial ComputingDifferential Revision: https://reviews.freebsd.org/D5075
Move Open Firmware device root on PowerPC, ARM, and MIPS systems toa sub-node of nexus (ofwbus) rather than direct attach under nexus. Thisfixes FDT on x86 and will make coexistence with ACPI on AR
Move Open Firmware device root on PowerPC, ARM, and MIPS systems toa sub-node of nexus (ofwbus) rather than direct attach under nexus. Thisfixes FDT on x86 and will make coexistence with ACPI on ARM systems easier.SPARC is unchanged.Reviewed by: imp, ian
Add suspend/resume state saving for OpenPIC on PowerMac. It's likely thiscan be used on the others (cpcht and psim), but that has not been tested.
- With the demise of !ATA_CAM, ATA_STATIC_ID is the only ata(4) related option left but actually consumed by ada(4), so move it to opt_ada.h and get rid of opt_ata.h.- Fix stand-alone build of a
- With the demise of !ATA_CAM, ATA_STATIC_ID is the only ata(4) related option left but actually consumed by ada(4), so move it to opt_ada.h and get rid of opt_ata.h.- Fix stand-alone build of atacore(4) by adding opt_cam.h.- Use __FBSDID.- Use DEVMETHOD_END.- Use NULL instead of 0 for pointers.
Fix the interrupt code, broken 7 months ago. The interrupt frameworkalready supported nested PICs, but was limited to having a nestedAT-PIC only. With G5 support the need for nested OpenPIC control
Fix the interrupt code, broken 7 months ago. The interrupt frameworkalready supported nested PICs, but was limited to having a nestedAT-PIC only. With G5 support the need for nested OpenPIC controllersneeded to be added. This was done the wrong way and broke the MPC8555eval system in the process.OFW, as well as FDT, describe the interrupt routing in terms of acontroller and an interrupt pin on it. This needs to be mapped to aflat and global resource: the IRQ. The IRQ is the same as the PCIintline and as such needs to be representable in 8 bits. Secondly,ISA support pretty much dictates that IRQ 0-15 should be reservedfor ISA interrupts, because of the internal workins of south bridges.Both were broken.This change reverts revision 209298 for a big part and re-implementsit simpler. In particular:o The id() method of the PIC I/F is removed again. It's not needed.o The openpic_attach() function has been changed to take the OFW or FDT phandle of the controller as a second argument. All bus attachments that previously used openpic_attach() as the attach method of the device I/F now implement as bus-specific method and pass the phandle_t to the renamed openpic_attach().o Change powerpc_register_pic() to take a few more arguments. In particular: - Pass the number of IPIs specificly. The number of IRQs carved out for a PIC is the sum of the number of int. pins and IPIs. - Pass a flag indicating whether the PIC is an AT-PIC or not. This tells the interrupt framework whether to assign IRQ 0-15 or some other range.o Until we implement proper multi-pass bus enumeration, we have to handle the case where we need to map from PIC+pin to IRQ *before* the PIC gets registered. This is done in a similar way as before, but rather than carving out 256 IRQs per PIC, we carve out 128 IRQs (124 pins + 4 IPIs). This is supposed to handle the G5 case, but should really be fixed properly using multiple passes.o Have the interrupt framework set root_pic in most cases and not put that burden in PIC drivers (for the most part).o Remove powerpc_ign_lookup() and replace it with powerpc_get_irq(). Remove IGN_SHIFT, INTR_INTLINE and INTR_IGN.Related to the above, fix the Freescale PCI controller driver, brokenby the FDT code. Besides not attaching properly, bus numbers wereassigned improperly and enumeration was broken in general. Thisprevented the AT PIC from being discovered and interrupt routing towork properly. Consequently, the ata(4) controller stopped functioning.Fix the driver, and FDT PCI support, enough to get the MPC8555CDSgoing again. The FDT PCI code needs a whole lot more work.No breakages are expected, but lackiong G5 hardware, it's possiblethat there are unpleasant side-effects. At least MPC85xx support isback to where it was 7 months ago -- it's amazing how badly supportcan be broken in just 7 months...Sponsored by: Juniper Networks
Remove the unneeded header <machine/intr.h>.
Unbreak build.Pointy hat to: me
MFp4:Introduce ATA_CAM kernel option, turning ata(4) controller drivers intocam(4) interface modules. When enabled, this options deprecates all ata(4)peripheral drivers (ad, acd, ...) and interfac
MFp4:Introduce ATA_CAM kernel option, turning ata(4) controller drivers intocam(4) interface modules. When enabled, this options deprecates all ata(4)peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers(ada, cd, ...) and interfaces to be natively used instead.As side effect of this, ata(4) mode setting code was completely rewrittento make controller API more strict and permit above change. While doingthis, SATA revision was separated from PATA mode. It allows DMA-incapableSATA devices to operate and makes hw.ata.atapi_dma tunable work again.Also allow ata(4) controller drivers (except some specific or broken ones)to handle larger data transfers. Previous constraint of 64K was artificialand is not really required by PCI ATA BM specification or hardware.Submitted by: nwitehorn (powerpc part)
Move from using devclass_find_free_unit(ata_devclass, 0) to -1 for theunit number. Basically they are the same...
Convert PowerPC AIM PCI and nexus busses to standard OFW bus interface. Thissimplifies certain device attachments (Kauai ATA, for instance), and makespossible others on new hardware.On G5 systems
Convert PowerPC AIM PCI and nexus busses to standard OFW bus interface. Thissimplifies certain device attachments (Kauai ATA, for instance), and makespossible others on new hardware.On G5 systems, there are several otherwise standard PCI devices(Serverworks SATA) that will not allow their interrupt properties to bewritten, so this information must be supplied directly from Open Firmware.Obtained from: sparc64
Set sc_psim so that the openpic core can correct the off-by-oneerror in the number of IRQs that PSIM gives us.
Add support for the BUS_CONFIG_INTR() method to the platform and toopenpic(4). Make use of it in ocpbus(4). On the MPC85xxCDS, IRQ0:4are active-low.
Add PIC support for IPIs. When registering an interrupt handler,the PIC also informs the platform at which IRQ level it can startassigning IPIs, since this can depend on the number of IRQssupporte
Add PIC support for IPIs. When registering an interrupt handler,the PIC also informs the platform at which IRQ level it can startassigning IPIs, since this can depend on the number of IRQssupported for external interrupts.
Apply missing s/rv/res/g in previous commit.
MFamd64/ia64/i386: Only set the rman bus tags and handles inbus_activate_resource() methods instead of splitting it up betweenbus_alloc_resource() and bus_activate_resource().Glanced at by: marcel
123