summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/powermac
Commit message (Collapse)AuthorAgeFilesLines
* MFC r263710, r273377, r273378, r273423 and r273455:hselasky2014-10-272-20/+20
| | | | | | | - De-vnet hash sizes and hash masks. - Fix multiple issues related to arguments passed to SYSCTL macros. Sponsored by: Mellanox Technologies
* MFC r270945:ian2014-10-261-1/+1
| | | | | Rename OF_xref_phandle() to OF_node_from_xref() and add a new function that provides the inverse translation, OF_xref_from_node().
* MFC r259657,r264205,r264207:jhibbits2014-09-061-14/+131
| | | | | | | | | | | | | | | | | | | | | | r259657: Add suspend/resume capabilities to the ATI backlight ppc driver. With this, also shut off the display (DPMS-style) and disable the clocking when the backlight level is set to 0. This is taken from the radeonkms driver (radeon_legacy_encoders.c) which doesn't yet support PowerPC. r264205,r264207: Fix the ATI backlight driver off/on handling. Now this driver works correctly with the ATI Radeon 9700 in the PowerBook G4 1.67GHz. Code shamelessly taken in spirit from the radeonkms driver, which I hope will make this driver redundant in the future. Approved by: re (marius) Relnotes: yes (not suspend/resume, but the rest)
* MFC r261423, r261424, r261516, r261513, r261562, r261563, r261564, r261565,ian2014-05-155-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* MFC r258800, r258802, r258805, r258806, r258807, r258851, r258857,ian2014-05-141-5/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* MFC r258268, r258271, r258272, r258274, r258275, r258427, r258694, r258696,ian2014-05-145-20/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | r258697, r258757 Do not assume a value for #address-cells when parsing the OF translations map. This allows the kernel to get farther with OpenBIOS on 64-bit CPUs. Actually look up #address-cells instead of assuming it is correlated with the Uninorth version number. #interrupt-cells belongs to the iparent, not the device parent. Add a sysctl to allow disabling resetting the OF syscons. For PCI<->PCI bridges, #address-cells may be 3. Make RTAS calls, which call setfault() to recover from machine checks, preserve any existing fault buffer. badaddr() is used only in the grackle PCI driver, so move its definition there. Clean up a spurious setfault() declaration as well. This [phyp_console] driver doesn't need the /options node, so don't check for it. Use the Open Firmware-based CPU frequency determination as a generic fallback if we can't measure CPU frequency. This is also useful on a variety of embedded systems using FDT.
* MFC r257093:ian2014-05-131-7/+24
| | | | | | | Be a little more suspicious of thermal sensors, which can have single crazy readings occasionally. One wild reading should not be enough to trigger a shutdown, so instead wait for several concerning readings in a row.
* MFC r256870, r256898, r256899, r256900 (by nwhitehorn):ian2014-05-131-110/+0
| | | | | | | | | | | | | | 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).
* MFC r260607, r260610, r260934:andreast2014-04-122-2/+56
| | | | | | | | | | | | | | | | | | | r260607: The onyx codec works also as module, so add it. r260610: Described in the man page but not implemented. Here it comes, atomic_swap_32/64. The latter only for powerpc64. r260934: Fix the resource information for the i2s-a node on certain G5 PowerMacs. This is the first step needed to get the snapper codec working on those machines. The second step is to enable the corresponding I2S device and its clock. Tested on machines where the snapper codec was already working, a G4 PowerBook and a PowerMac9,1 with a Shasta based macio. The PowerMac7,2/7,3 with a K2 based macio can now also play sound.
* MFC r261309jhibbits2014-03-022-177/+14
| | | | | Unbreak non-SMP builds. This was broken by r259284. Also, reorganize the code introduced in that revision a bit.
* MFC r258779,r258780,r258787,r258822:eadler2014-02-041-1/+1
| | | | | | | | | | | | | Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result. Similar to the (1 << 31) case it is not defined to do (2 << 30). This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD.
* MFC r260872:jhibbits2014-01-261-1/+1
| | | | | There's actually no data in the PMU_GET_VERSION command. Don't send any. This change now allows the PMU to be used on PowerBook5,8
* MFC r259284,r259287jhibbits2014-01-156-25/+300
| | | | | Add PMU-based CPU frequency scalling. This is used on most Titanium PowerBooks.
* MFC r259082jhibbits2014-01-151-1/+2
| | | | | | Make some unsigned ints signed. Found by: clang (powerpc64)
* MFC: 256555andreast2013-10-212-41/+47
| | | | | | | | | | | | | Move the resource allocation from the ata_*_probe section to the ata_*_attach section. This prevents a boot crash on nearly all iMacs and PowerMacs/Books. The allocation in the probe section was working before because ata_probe was returning 0 which did not invoke a second DEVICE_PROBE. Now it returns a BUS_PROBE_DEFAULT which can invoke a second DEVICE_PROBE which results in a "failed to reserve resource" exit. PR: powerpc/182978 Approved by: re(gjb)
* Rework handling of ofw_quiesce(), making it the responsibility of thenwhitehorn2013-09-271-0/+31
| | | | | | | | | | platform modules. Whether to call this function or not is highly machine dependent: on some systems, it is required, while on others it breaks everything. Platform modules are in a better position to figure this out. This is required for POWER hypervisor SCSI to work correctly. There are no functional changes on Powermac systems. Approved by: re (kib)
* Attach only on hardware that is actually supported as opposed to hardwarenwhitehorn2013-09-091-2/+16
| | | | | | that seems like it has some of the problems we might want. Approved by: re (kib)
* Only add the backlight device if it actually exists in OF.jhibbits2013-08-312-0/+4
| | | | MFC after: 1 week
* Return EIO iso -1, the kiic_transfer has an signed return.andreast2013-08-231-1/+1
| | | | Submitted by: Luiz Otavio O Souza <loos.br AT gmail.com>
* Add the macio attachment for wi(4). Partially obtained from NetBSD.jhibbits2013-07-312-0/+51
| | | | | Reviewed by: adrian Obtained from: NetBSD (partially)
* Only check fan type once. Not only is continuously rechecking pointless, anwhitehorn2013-05-051-11/+40
| | | | | | single random failure can reprogram what control mechanism we try to use. MFC after: 2 weeks
* - With the demise of !ATA_CAM, ATA_STATIC_ID is the only ata(4) relatedmarius2013-04-063-17/+17
| | | | | | | | | 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.
* Introduce PLATFORMMETHOD_END and use it.rpaulo2013-02-131-1/+1
|
* Work around broken device tree on last-generation PowerPC iMacsnwhitehorn2012-10-291-0/+4
| | | | | | | | | (PowerMac12,1), which have a mac-io MPIC cell that indifies itself as the root PIC despite the actual root PIC being on the northbridge. No CPC945 systems have a mac-io PIC that does anything so just don't attach on CPC945 (U4) systems. MFC after: 3 days
* phandle_t is unsigned, and OF_finddevice() returns (phandle_t)(-1) onjhibbits2012-08-212-3/+3
| | | | | | | | | failure, so check for that instead of 0. While here, provide a better description for ATI backlight driver. Reported by: jchandra@ MFC after: 3 days
* Add backlight support for nVidia-based PowerBooks/iBooks/iMacs.jhibbits2012-08-041-0/+197
| | | | | Approved by: nwhitehorn (mentor) MFC after: 9.1-RELEASE
* Remove bogus __unused attribute from hrowpic_eoi().rpaulo2012-07-011-1/+1
|
* Provide a fix for certain PowerMacs where the U3 i2c lacks the interruptandreast2012-03-191-1/+30
| | | | | | | info. Tested by: Robert Hish MFC after: 1 week
* Add support for PWM controlled fans. I found these fans on my PowerMac9,1.andreast2012-03-041-72/+299
| | | | | | | | | These fans are not located under the same node as the the RPM controlled ones, So I had to adapt the current source to parse and fill the properties correctly. To control the fans we can set the PWM ratio via sysctl between 20 and 100%. Tested by: nwhitehorn MFC after: 3 weeks
* Add backlight control to ATI-graphics PowerBooks and iBooks.jhibbits2012-02-261-0/+196
| | | | | Approved by: nwhitehorn (mentor) MFC after: 1 week
* Improve error handling in smusat(4).nwhitehorn2012-02-151-5/+18
| | | | MFC after: 4 days
* Compatibility with IBM firmware.nwhitehorn2012-02-041-15/+17
|
* Miffed r230993 due to a one-character typo while reviewing the patch.nwhitehorn2012-02-041-1/+1
|
* Unify OF PCI infrastructure, including changing from parsing the devicenwhitehorn2012-02-045-926/+27
| | | | | | | tree based on heuristics to parsing it based on the spec. This should also lay the foundation for NEW_PCIB on PowerPC. MFC after: 3 months
* Prevent an error resulting from signed/unsigned comparison on systemsnwhitehorn2012-01-201-1/+1
| | | | | | | that do not comply with the OF spec. Submitted by: Anders Gavare MFC after: 1 week
* Add PWM monitoring sysctl to G4 MDD (Windtunnel) fan driver. While there, cleanjhibbits2012-01-121-10/+34
| | | | | | | up some style nits. Approved by: nwhitehorn (mentor) MFC after: 3 days
* Fix style(9) issues from r228270.jhibbits2011-12-051-2/+2
| | | | Approved by: nwhitehorn (mentor)
* Add a devd notification for closing/opening the lid on PowerBooks and iBooks.jhibbits2011-12-052-0/+15
| | | | Approved by: nwhitehorn (mentor)
* Fix OF_finddevice error return value in case of FDT.jchandra2011-12-021-2/+2
| | | | | | | | | | | | | | | | | | | According to the open firmware standard, finddevice call has to return a phandle with value of -1 in case of error. This commit is to: - Fix the FDT implementation of this interface (ofw_fdt_finddevice) to return (phandle_t)-1 in case of error, instead of 0 as it does now. - Fix up the callers of OF_finddevice() to compare the return value with -1 instead of 0 to check for errors. - Since phandle_t is unsigned, the return value of OF_finddevice should be checked with '== -1' rather than '<= 0' or '> 0', fix up these cases as well. Reported by: nwhitehorn Reviewed by: raj Approved by: raj, nwhitehorn
* - There's no need to overwrite the default device method with the defaultmarius2011-11-225-22/+15
| | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-075-5/+5
| | | | This means that their use is restricted to a single C file.
* Fix an error that could cause sysctl -a to enter an infinite loop in thenwhitehorn2011-07-301-6/+6
| | | | | | | | event of a broken or busy fan due to returning incorrect error codes from the FCU sysctl handler. Reported by: Path Mather <paul at gromit dot dlib dot vt dot edu>1 Approved by: re (kib)
* Turn the minimum PWM fan speed down to 30 from 40. It turns out the burningnwhitehorn2011-06-261-1/+1
| | | | | | | smell that caused me to turn this up was due to a failed fan burning, not a CPU (plus a healthy dose of paranoia). Submitted by: Paul Mather <paul at gromit dot dlib dot vt dot edu>
* Add new fan controller driver for the G4 MDD PowerMac. Submitted and testedandreast2011-06-041-0/+216
| | | | | | by Justin Hibbits. Approved by: nwhitehorn (mentor)
* - Improve error handling.andreast2011-06-041-30/+60
| | | | | | - Add retry loops for the i2c read/write functions. Approved by: nwhitehorn (mentor)
* - Introduce a define for ZERO_C_TO_K.andreast2011-06-032-3/+6
| | | | | | - Fix the printing of the temperature when we exceed the critical value. Approved by: nwhitehorn (mentor)
* Use kproc_exit() instead of returning from the management function onnwhitehorn2011-05-291-1/+1
| | | | systems with no manageable thermal control devices.
* Add some error handling here: if a sensor returns an error code (a negativenwhitehorn2011-05-291-1/+5
| | | | | | | Kelvin temperature, which is impossible except for some contrived magnetic spin systems), use the previous measurement from that sensor instead of corrupting everything and randomly changing the fans or shutting off the machine.
* Add the next digit of precision to temperatures, which I missed whennwhitehorn2011-05-292-2/+2
| | | | converting the reporting format from degrees C to 0.1 degree K.
* Don't put negative values into the averages.nwhitehorn2011-05-291-0/+2
|
OpenPOWER on IntegriCloud