aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ABI/testing
ModeNameSize
-rw-r--r--configfs-acpi1333logstatsplainblame
-rw-r--r--configfs-iio905logstatsplainblame
-rw-r--r--configfs-rdma_cm781logstatsplainblame
-rw-r--r--configfs-spear-pcie-gadget1261logstatsplainblame
-rw-r--r--configfs-stp-policy1563logstatsplainblame
-rw-r--r--configfs-usb-gadget3445logstatsplainblame
-rw-r--r--configfs-usb-gadget-acm270logstatsplainblame
-rw-r--r--configfs-usb-gadget-ecm422logstatsplainblame
-rw-r--r--configfs-usb-gadget-eem420logstatsplainblame
-rw-r--r--configfs-usb-gadget-ffs298logstatsplainblame
-rw-r--r--configfs-usb-gadget-hid338logstatsplainblame
-rw-r--r--configfs-usb-gadget-loopback185logstatsplainblame
-rw-r--r--configfs-usb-gadget-mass-storage1063logstatsplainblame
-rw-r--r--configfs-usb-gadget-midi365logstatsplainblame
-rw-r--r--configfs-usb-gadget-ncm421logstatsplainblame
-rw-r--r--configfs-usb-gadget-obex273logstatsplainblame
-rw-r--r--configfs-usb-gadget-phonet251logstatsplainblame
-rw-r--r--configfs-usb-gadget-printer226logstatsplainblame
-rw-r--r--configfs-usb-gadget-rndis422logstatsplainblame
-rw-r--r--configfs-usb-gadget-serial273logstatsplainblame
-rw-r--r--configfs-usb-gadget-sourcesink416logstatsplainblame
-rw-r--r--configfs-usb-gadget-subset421logstatsplainblame
-rw-r--r--configfs-usb-gadget-tcm210logstatsplainblame
-rw-r--r--configfs-usb-gadget-uac1376logstatsplainblame
-rw-r--r--configfs-usb-gadget-uac2340logstatsplainblame
-rw-r--r--configfs-usb-gadget-uvc8894logstatsplainblame
-rw-r--r--debugfs-driver-genwqe3784logstatsplainblame
-rw-r--r--debugfs-ec838logstatsplainblame
-rw-r--r--debugfs-ideapad465logstatsplainblame
-rw-r--r--debugfs-olpc572logstatsplainblame
-rw-r--r--debugfs-pfo-nx-crypto1188logstatsplainblame
-rw-r--r--debugfs-pktcdvd448logstatsplainblame
-rw-r--r--dev-kmsg4677logstatsplainblame
-rw-r--r--evm1180logstatsplainblame
-rw-r--r--gpio-cdev653logstatsplainblame
-rw-r--r--ima_policy3259logstatsplainblame
-rw-r--r--procfs-diskstats655logstatsplainblame
-rw-r--r--pstore1707logstatsplainblame
-rw-r--r--sysfs-ata2820logstatsplainblame
-rw-r--r--sysfs-block9146logstatsplainblame
-rw-r--r--sysfs-block-bcache5873logstatsplainblame
-rw-r--r--sysfs-block-dm1665logstatsplainblame
-rw-r--r--sysfs-block-rssd223logstatsplainblame
-rw-r--r--sysfs-block-zram6301logstatsplainblame
-rw-r--r--sysfs-bus-acpi1983logstatsplainblame
-rw-r--r--sysfs-bus-amba1136logstatsplainblame
-rw-r--r--sysfs-bus-bcma945logstatsplainblame
-rw-r--r--sysfs-bus-coresight-devices-etb103280logstatsplainblame
-rw-r--r--sysfs-bus-coresight-devices-etm3x13143logstatsplainblame
-rw-r--r--sysfs-bus-coresight-devices-etm4x17727logstatsplainblame
-rw-r--r--sysfs-bus-coresight-devices-funnel463logstatsplainblame
-rw-r--r--sysfs-bus-coresight-devices-stm2207logstatsplainblame
-rw-r--r--sysfs-bus-coresight-devices-tmc3583logstatsplainblame
-rw-r--r--sysfs-bus-css1396logstatsplainblame
-rw-r--r--sysfs-bus-event_source-devices-events3132logstatsplainblame
-rw-r--r--sysfs-bus-event_source-devices-format704logstatsplainblame
-rw-r--r--sysfs-bus-event_source-devices-hv_24x71928logstatsplainblame
-rw-r--r--sysfs-bus-event_source-devices-hv_gpci1720logstatsplainblame
-rw-r--r--sysfs-bus-fcoe4611logstatsplainblame
-rw-r--r--sysfs-bus-hsi683logstatsplainblame
-rw-r--r--sysfs-bus-i2c-devices-fsa9480602logstatsplainblame
-rw-r--r--sysfs-bus-i2c-devices-hm6352640logstatsplainblame
-rw-r--r--sysfs-bus-i2c-devices-lm3533472logstatsplainblame
-rw-r--r--sysfs-bus-iio75256logstatsplainblame
-rw-r--r--sysfs-bus-iio-accel-bmc150315logstatsplainblame
-rw-r--r--sysfs-bus-iio-adc-hi84351927logstatsplainblame
-rw-r--r--sysfs-bus-iio-chemical-vz89x283logstatsplainblame
-rw-r--r--sysfs-bus-iio-frequency-ad95231180logstatsplainblame
-rw-r--r--sysfs-bus-iio-frequency-adf43501001logstatsplainblame
-rw-r--r--sysfs-bus-iio-gyro-bmg160300logstatsplainblame
-rw-r--r--sysfs-bus-iio-health-afe440x1432logstatsplainblame
-rw-r--r--sysfs-bus-iio-humidity-hdc100x345logstatsplainblame
-rw-r--r--sysfs-bus-iio-ina2xx-adc1043logstatsplainblame
-rw-r--r--sysfs-bus-iio-light-lm3533-als2051logstatsplainblame
-rw-r--r--sysfs-bus-iio-magnetometer-hmc5843676logstatsplainblame
-rw-r--r--sysfs-bus-iio-meas-spec380logstatsplainblame
-rw-r--r--sysfs-bus-iio-mpu6050745logstatsplainblame
-rw-r--r--sysfs-bus-iio-proximity-as3935500logstatsplainblame
-rw-r--r--sysfs-bus-iio-trigger-sysfs1885logstatsplainblame
-rw-r--r--sysfs-bus-iio-vf610573logstatsplainblame
-rw-r--r--sysfs-bus-intel_th-devices-gth1877logstatsplainblame
-rw-r--r--sysfs-bus-intel_th-devices-msc1389logstatsplainblame
-rw-r--r--sysfs-bus-intel_th-devices-pti923logstatsplainblame
-rw-r--r--sysfs-bus-intel_th-output-devices544logstatsplainblame
-rw-r--r--sysfs-bus-mcb820logstatsplainblame
-rw-r--r--sysfs-bus-mdio1075logstatsplainblame
-rw-r--r--sysfs-bus-media268logstatsplainblame
-rw-r--r--sysfs-bus-mei842logstatsplainblame
-rw-r--r--sysfs-bus-pci12538logstatsplainblame
-rw-r--r--sysfs-bus-pci-devices-cciss2745logstatsplainblame
-rw-r--r--sysfs-bus-pci-drivers-ehci_hcd1816logstatsplainblame
-rw-r--r--sysfs-bus-pci-drivers-janz-cmodio298logstatsplainblame
-rw-r--r--sysfs-bus-platform1138logstatsplainblame
-rw-r--r--sysfs-bus-rbd3188logstatsplainblame
-rw-r--r--sysfs-bus-rpmsg2975logstatsplainblame
-rw-r--r--sysfs-bus-umc1018logstatsplainblame
-rw-r--r--sysfs-bus-usb9142logstatsplainblame
-rw-r--r--sysfs-bus-usb-devices-usbsevseg1539logstatsplainblame
-rw-r--r--sysfs-bus-usb-lvstest1783logstatsplainblame
-rw-r--r--sysfs-c2port2931logstatsplainblame
-rw-r--r--sysfs-cfq-target-latency358logstatsplainblame
-rw-r--r--sysfs-class532logstatsplainblame
-rw-r--r--sysfs-class-backlight-driver-adp88702380logstatsplainblame
-rw-r--r--sysfs-class-backlight-driver-lm35331286logstatsplainblame
-rw-r--r--sysfs-class-bdi1656logstatsplainblame
-rw-r--r--sysfs-class-cxl10203logstatsplainblame
-rw-r--r--sysfs-class-devfreq3764logstatsplainblame
-rw-r--r--sysfs-class-extcon3406logstatsplainblame
-rw-r--r--sysfs-class-fpga-manager1564logstatsplainblame
-rw-r--r--sysfs-class-infiniband610logstatsplainblame
-rw-r--r--sysfs-class-iommu508logstatsplainblame
-rw-r--r--sysfs-class-iommu-amd-iommu440logstatsplainblame
-rw-r--r--sysfs-class-iommu-intel-iommu1037logstatsplainblame
-rw-r--r--sysfs-class-lcd681logstatsplainblame
-rw-r--r--sysfs-class-led1386logstatsplainblame
-rw-r--r--sysfs-class-led-driver-lm35331541logstatsplainblame
-rw-r--r--sysfs-class-led-flash3091logstatsplainblame
-rw-r--r--sysfs-class-led-trigger-oneshot1156logstatsplainblame
-rw-r--r--sysfs-class-led-trigger-usbport467logstatsplainblame
-rw-r--r--sysfs-class-leds-gt683r474logstatsplainblame
-rw-r--r--sysfs-class-mei903logstatsplainblame
-rw-r--r--sysfs-class-mic.txt6590logstatsplainblame
-rw-r--r--sysfs-class-mtd7922logstatsplainblame
-rw-r--r--sysfs-class-net8162logstatsplainblame
-rw-r--r--sysfs-class-net-batman-adv1292logstatsplainblame
-rw-r--r--sysfs-class-net-cdc_ncm5446logstatsplainblame
-rw-r--r--sysfs-class-net-grcan1454logstatsplainblame
-rw-r--r--sysfs-class-net-janz-ican3651logstatsplainblame
-rw-r--r--sysfs-class-net-mesh4496logstatsplainblame
-rw-r--r--sysfs-class-net-qmi883logstatsplainblame
-rw-r--r--sysfs-class-net-queues2971logstatsplainblame
-rw-r--r--sysfs-class-net-statistics6696logstatsplainblame
-rw-r--r--sysfs-class-pktcdvd2800logstatsplainblame
-rw-r--r--sysfs-class-power4949logstatsplainblame
-rw-r--r--sysfs-class-power-twl40301346logstatsplainblame
-rw-r--r--sysfs-class-powercap5019logstatsplainblame
-rw-r--r--sysfs-class-pwm2564logstatsplainblame
-rw-r--r--sysfs-class-rc4351logstatsplainblame
-rw-r--r--sysfs-class-rc-nuvoton586logstatsplainblame
-rw-r--r--sysfs-class-regulator12212logstatsplainblame
-rw-r--r--sysfs-class-rtc-rtc0-device-rtc_calibration717logstatsplainblame
-rw-r--r--sysfs-class-scsi_host1501logstatsplainblame
-rw-r--r--sysfs-class-scsi_tape3354logstatsplainblame
-rw-r--r--sysfs-class-stm802logstatsplainblame
-rw-r--r--sysfs-class-stm_source530logstatsplainblame
-rw-r--r--sysfs-class-uwb_rc5652logstatsplainblame
-rw-r--r--sysfs-class-uwb_rc-wusbhc2469logstatsplainblame
-rw-r--r--sysfs-class-watchdog1625logstatsplainblame
-rw-r--r--sysfs-class-zram768logstatsplainblame
-rw-r--r--sysfs-dev693logstatsplainblame
-rw-r--r--sysfs-devices1033logstatsplainblame
-rw-r--r--sysfs-devices-edac6247logstatsplainblame
-rw-r--r--sysfs-devices-firmware_node686logstatsplainblame
-rw-r--r--sysfs-devices-lpss_ltr1739logstatsplainblame
-rw-r--r--sysfs-devices-memory3712logstatsplainblame
-rw-r--r--sysfs-devices-mmc985logstatsplainblame
-rw-r--r--sysfs-devices-online1008logstatsplainblame
-rw-r--r--sysfs-devices-platform-_UDC_-gadget667logstatsplainblame
-rw-r--r--sysfs-devices-platform-docg31277logstatsplainblame
-rw-r--r--sysfs-devices-platform-sh_mobile_lcdc_fb1541logstatsplainblame
-rw-r--r--sysfs-devices-power11803logstatsplainblame
-rw-r--r--sysfs-devices-power_resources_D0580logstatsplainblame
-rw-r--r--sysfs-devices-power_resources_D1614logstatsplainblame
-rw-r--r--sysfs-devices-power_resources_D2614logstatsplainblame
-rw-r--r--sysfs-devices-power_resources_D3hot626logstatsplainblame
-rw-r--r--sysfs-devices-power_resources_wakeup589logstatsplainblame
-rw-r--r--sysfs-devices-power_state877logstatsplainblame
-rw-r--r--sysfs-devices-real_power_state1026logstatsplainblame
-rw-r--r--sysfs-devices-resource_in_use471logstatsplainblame
-rw-r--r--sysfs-devices-soc2073logstatsplainblame
-rw-r--r--sysfs-devices-sun600logstatsplainblame
-rw-r--r--sysfs-devices-system-cpu13699logstatsplainblame
-rw-r--r--sysfs-devices-system-ibm-rtl873logstatsplainblame
-rw-r--r--sysfs-devices-system-xen_cpu670logstatsplainblame
-rw-r--r--sysfs-driver-genwqe2934logstatsplainblame
-rw-r--r--sysfs-driver-hid1124logstatsplainblame
-rw-r--r--sysfs-driver-hid-corsair582logstatsplainblame
-rw-r--r--sysfs-driver-hid-lenovo2835logstatsplainblame
-rw-r--r--sysfs-driver-hid-logitech-lg4ff2420logstatsplainblame
-rw-r--r--sysfs-driver-hid-multitouch531logstatsplainblame
-rw-r--r--sysfs-driver-hid-picolcd1846logstatsplainblame
-rw-r--r--sysfs-driver-hid-prodikeys985logstatsplainblame
-rw-r--r--sysfs-driver-hid-roccat-kone5060logstatsplainblame
-rw-r--r--sysfs-driver-hid-srws1922logstatsplainblame
-rw-r--r--sysfs-driver-hid-wiimote3627logstatsplainblame
-rw-r--r--sysfs-driver-input-axp-pek437logstatsplainblame
-rw-r--r--sysfs-driver-intel-rapid-start844logstatsplainblame
-rw-r--r--sysfs-driver-pciback672logstatsplainblame
-rw-r--r--sysfs-driver-ppi2705logstatsplainblame
-rw-r--r--sysfs-driver-samsung-laptop1788logstatsplainblame
-rw-r--r--sysfs-driver-st543logstatsplainblame
-rw-r--r--sysfs-driver-tegra-fuse588logstatsplainblame
-rw-r--r--sysfs-driver-toshiba_acpi7472logstatsplainblame
-rw-r--r--sysfs-driver-toshiba_haps708logstatsplainblame
-rw-r--r--sysfs-driver-wacom4499logstatsplainblame
-rw-r--r--sysfs-driver-xen-blkback736logstatsplainblame
-rw-r--r--sysfs-driver-xen-blkfront533logstatsplainblame
-rw-r--r--sysfs-firmware-acpi6629logstatsplainblame
-rw-r--r--sysfs-firmware-dmi-entries4079logstatsplainblame
-rw-r--r--sysfs-firmware-dmi-tables907logstatsplainblame
-rw-r--r--sysfs-firmware-efi973logstatsplainblame
-rw-r--r--sysfs-firmware-efi-esrt2908logstatsplainblame
-rw-r--r--sysfs-firmware-efi-runtime-map1268logstatsplainblame
-rw-r--r--sysfs-firmware-gsmi2062logstatsplainblame
-rw-r--r--sysfs-firmware-log223logstatsplainblame
-rw-r--r--sysfs-firmware-memmap2329logstatsplainblame
-rw-r--r--sysfs-firmware-ofw1230logstatsplainblame
-rw-r--r--sysfs-firmware-qemu_fw_cfg3734logstatsplainblame
-rw-r--r--sysfs-firmware-sfi466logstatsplainblame
-rw-r--r--sysfs-firmware-sgi_uv889logstatsplainblame
-rw-r--r--sysfs-fs-ext43783logstatsplainblame
-rw-r--r--sysfs-fs-f2fs3340logstatsplainblame
-rw-r--r--sysfs-fs-nilfs28014logstatsplainblame
-rw-r--r--sysfs-fs-xfs1201logstatsplainblame
-rw-r--r--sysfs-hypervisor-pmu875logstatsplainblame
-rw-r--r--sysfs-ibft1502logstatsplainblame
-rw-r--r--sysfs-kernel-boot_params1264logstatsplainblame
-rw-r--r--sysfs-kernel-fscaps208logstatsplainblame
-rw-r--r--sysfs-kernel-iommu_groups616logstatsplainblame
-rw-r--r--sysfs-kernel-irq1940logstatsplainblame
-rw-r--r--sysfs-kernel-livepatch1525logstatsplainblame
-rw-r--r--sysfs-kernel-mm202logstatsplainblame
-rw-r--r--sysfs-kernel-mm-hugepages521logstatsplainblame
-rw-r--r--sysfs-kernel-mm-ksm1738logstatsplainblame
-rw-r--r--sysfs-kernel-slab17556logstatsplainblame
-rw-r--r--sysfs-kernel-uids658logstatsplainblame
-rw-r--r--sysfs-kernel-vmcoreinfo597logstatsplainblame
-rw-r--r--sysfs-memory-page-offline1681logstatsplainblame
-rw-r--r--sysfs-module1711logstatsplainblame
-rw-r--r--sysfs-ocfs23089logstatsplainblame
-rw-r--r--sysfs-platform-asus-laptop2049logstatsplainblame
-rw-r--r--sysfs-platform-asus-wmi1142logstatsplainblame
-rw-r--r--sysfs-platform-at91799logstatsplainblame
-rw-r--r--sysfs-platform-brcmstb-gisb-arb306logstatsplainblame
-rw-r--r--sysfs-platform-chipidea-usb-otg1975logstatsplainblame
-rw-r--r--sysfs-platform-dell-laptop2612logstatsplainblame
-rw-r--r--sysfs-platform-eeepc-laptop1551logstatsplainblame
-rw-r--r--sysfs-platform-hidma349logstatsplainblame
-rw-r--r--sysfs-platform-hidma-mgmt3457logstatsplainblame
-rw-r--r--sysfs-platform-i2c-demux-pinctrl655logstatsplainblame
-rw-r--r--sysfs-platform-ideapad-laptop531logstatsplainblame
-rw-r--r--sysfs-platform-kim1974logstatsplainblame
-rw-r--r--sysfs-platform-msi-laptop2937logstatsplainblame
-rw-r--r--sysfs-platform-tahvo-usb445logstatsplainblame
-rw-r--r--sysfs-platform-ts55001767logstatsplainblame
-rw-r--r--sysfs-platform-twl4030-usb218logstatsplainblame
-rw-r--r--sysfs-platform-usbip-vudc1172logstatsplainblame
-rw-r--r--sysfs-power11845logstatsplainblame
-rw-r--r--sysfs-pps2192logstatsplainblame
-rw-r--r--sysfs-profiling337logstatsplainblame
-rw-r--r--sysfs-ptp4287logstatsplainblame
-rw-r--r--sysfs-tty4771logstatsplainblame
-rw-r--r--sysfs-wusb_cbaf3945logstatsplainblame
t">|| var->yres > 1024) printk(KERN_ERR "%s: invalid yres %d\n", fbi->fb.fix.id, var->yres); if (var->vsync_len < 1 || var->vsync_len > 64) printk(KERN_ERR "%s: invalid vsync_len %d\n", fbi->fb.fix.id, var->vsync_len); if (var->upper_margin < 0 || var->upper_margin > 255) printk(KERN_ERR "%s: invalid upper_margin %d\n", fbi->fb.fix.id, var->upper_margin); if (var->lower_margin < 0 || var->lower_margin > 255) printk(KERN_ERR "%s: invalid lower_margin %d\n", fbi->fb.fix.id, var->lower_margin); #endif new_regs.lccr0 = fbi->lccr0 | LCCR0_LEN | LCCR0_LDM | LCCR0_BAM | LCCR0_ERM | LCCR0_LtlEnd | LCCR0_DMADel(0); new_regs.lccr1 = LCCR1_DisWdth(var->xres) + LCCR1_HorSnchWdth(var->hsync_len) + LCCR1_BegLnDel(var->left_margin) + LCCR1_EndLnDel(var->right_margin); /* * If we have a dual scan LCD, then we need to halve * the YRES parameter. */ yres = var->yres; if (fbi->lccr0 & LCCR0_Dual) yres /= 2; new_regs.lccr2 = LCCR2_DisHght(yres) + LCCR2_VrtSnchWdth(var->vsync_len) + LCCR2_BegFrmDel(var->upper_margin) + LCCR2_EndFrmDel(var->lower_margin); pcd = get_pcd(var->pixclock, cpufreq_get(0)); new_regs.lccr3 = LCCR3_PixClkDiv(pcd) | fbi->lccr3 | (var->sync & FB_SYNC_HOR_HIGH_ACT ? LCCR3_HorSnchH : LCCR3_HorSnchL) | (var->sync & FB_SYNC_VERT_HIGH_ACT ? LCCR3_VrtSnchH : LCCR3_VrtSnchL); DPRINTK("nlccr0 = 0x%08lx\n", new_regs.lccr0); DPRINTK("nlccr1 = 0x%08lx\n", new_regs.lccr1); DPRINTK("nlccr2 = 0x%08lx\n", new_regs.lccr2); DPRINTK("nlccr3 = 0x%08lx\n", new_regs.lccr3); half_screen_size = var->bits_per_pixel; half_screen_size = half_screen_size * var->xres * var->yres / 16; /* Update shadow copy atomically */ local_irq_save(flags); fbi->dbar1 = fbi->palette_dma; fbi->dbar2 = fbi->screen_dma + half_screen_size; fbi->reg_lccr0 = new_regs.lccr0; fbi->reg_lccr1 = new_regs.lccr1; fbi->reg_lccr2 = new_regs.lccr2; fbi->reg_lccr3 = new_regs.lccr3; local_irq_restore(flags); /* * Only update the registers if the controller is enabled * and something has changed. */ if ((LCCR0 != fbi->reg_lccr0) || (LCCR1 != fbi->reg_lccr1) || (LCCR2 != fbi->reg_lccr2) || (LCCR3 != fbi->reg_lccr3) || (DBAR1 != fbi->dbar1) || (DBAR2 != fbi->dbar2)) sa1100fb_schedule_work(fbi, C_REENABLE); return 0; } /* * NOTE! The following functions are purely helpers for set_ctrlr_state. * Do not call them directly; set_ctrlr_state does the correct serialisation * to ensure that things happen in the right way 100% of time time. * -- rmk */ static inline void __sa1100fb_backlight_power(struct sa1100fb_info *fbi, int on) { DPRINTK("backlight o%s\n", on ? "n" : "ff"); if (sa1100fb_backlight_power) sa1100fb_backlight_power(on); } static inline void __sa1100fb_lcd_power(struct sa1100fb_info *fbi, int on) { DPRINTK("LCD power o%s\n", on ? "n" : "ff"); if (sa1100fb_lcd_power) sa1100fb_lcd_power(on); } static void sa1100fb_setup_gpio(struct sa1100fb_info *fbi) { u_int mask = 0; /* * Enable GPIO<9:2> for LCD use if: * 1. Active display, or * 2. Color Dual Passive display * * see table 11.8 on page 11-27 in the SA1100 manual * -- Erik. * * SA1110 spec update nr. 25 says we can and should * clear LDD15 to 12 for 4 or 8bpp modes with active * panels. */ if ((fbi->reg_lccr0 & LCCR0_CMS) == LCCR0_Color && (fbi->reg_lccr0 & (LCCR0_Dual|LCCR0_Act)) != 0) { mask = GPIO_LDD11 | GPIO_LDD10 | GPIO_LDD9 | GPIO_LDD8; if (fbi->fb.var.bits_per_pixel > 8 || (fbi->reg_lccr0 & (LCCR0_Dual|LCCR0_Act)) == LCCR0_Dual) mask |= GPIO_LDD15 | GPIO_LDD14 | GPIO_LDD13 | GPIO_LDD12; } if (mask) { GPDR |= mask; GAFR |= mask; } } static void sa1100fb_enable_controller(struct sa1100fb_info *fbi) { DPRINTK("Enabling LCD controller\n"); /* * Make sure the mode bits are present in the first palette entry */ fbi->palette_cpu[0] &= 0xcfff; fbi->palette_cpu[0] |= palette_pbs(&fbi->fb.var); /* Sequence from 11.7.10 */ LCCR3 = fbi->reg_lccr3; LCCR2 = fbi->reg_lccr2; LCCR1 = fbi->reg_lccr1; LCCR0 = fbi->reg_lccr0 & ~LCCR0_LEN; DBAR1 = fbi->dbar1; DBAR2 = fbi->dbar2; LCCR0 |= LCCR0_LEN; if (machine_is_shannon()) { GPDR |= SHANNON_GPIO_DISP_EN; GPSR |= SHANNON_GPIO_DISP_EN; } DPRINTK("DBAR1 = 0x%08x\n", DBAR1); DPRINTK("DBAR2 = 0x%08x\n", DBAR2); DPRINTK("LCCR0 = 0x%08x\n", LCCR0); DPRINTK("LCCR1 = 0x%08x\n", LCCR1); DPRINTK("LCCR2 = 0x%08x\n", LCCR2); DPRINTK("LCCR3 = 0x%08x\n", LCCR3); } static void sa1100fb_disable_controller(struct sa1100fb_info *fbi) { DECLARE_WAITQUEUE(wait, current); DPRINTK("Disabling LCD controller\n"); if (machine_is_shannon()) { GPCR |= SHANNON_GPIO_DISP_EN; } set_current_state(TASK_UNINTERRUPTIBLE); add_wait_queue(&fbi->ctrlr_wait, &wait); LCSR = 0xffffffff; /* Clear LCD Status Register */ LCCR0 &= ~LCCR0_LDM; /* Enable LCD Disable Done Interrupt */ LCCR0 &= ~LCCR0_LEN; /* Disable LCD Controller */ schedule_timeout(20 * HZ / 1000); remove_wait_queue(&fbi->ctrlr_wait, &wait); } /* * sa1100fb_handle_irq: Handle 'LCD DONE' interrupts. */ static irqreturn_t sa1100fb_handle_irq(int irq, void *dev_id) { struct sa1100fb_info *fbi = dev_id; unsigned int lcsr = LCSR; if (lcsr & LCSR_LDD) { LCCR0 |= LCCR0_LDM; wake_up(&fbi->ctrlr_wait); } LCSR = lcsr; return IRQ_HANDLED; } /* * This function must be called from task context only, since it will * sleep when disabling the LCD controller, or if we get two contending * processes trying to alter state. */ static void set_ctrlr_state(struct sa1100fb_info *fbi, u_int state) { u_int old_state; down(&fbi->ctrlr_sem); old_state = fbi->state; /* * Hack around fbcon initialisation. */ if (old_state == C_STARTUP && state == C_REENABLE) state = C_ENABLE; switch (state) { case C_DISABLE_CLKCHANGE: /* * Disable controller for clock change. If the * controller is already disabled, then do nothing. */ if (old_state != C_DISABLE && old_state != C_DISABLE_PM) { fbi->state = state; sa1100fb_disable_controller(fbi); } break; case C_DISABLE_PM: case C_DISABLE: /* * Disable controller */ if (old_state != C_DISABLE) { fbi->state = state; __sa1100fb_backlight_power(fbi, 0); if (old_state != C_DISABLE_CLKCHANGE) sa1100fb_disable_controller(fbi); __sa1100fb_lcd_power(fbi, 0); } break; case C_ENABLE_CLKCHANGE: /* * Enable the controller after clock change. Only * do this if we were disabled for the clock change. */ if (old_state == C_DISABLE_CLKCHANGE) { fbi->state = C_ENABLE; sa1100fb_enable_controller(fbi); } break; case C_REENABLE: /* * Re-enable the controller only if it was already * enabled. This is so we reprogram the control * registers. */ if (old_state == C_ENABLE) { sa1100fb_disable_controller(fbi); sa1100fb_setup_gpio(fbi); sa1100fb_enable_controller(fbi); } break; case C_ENABLE_PM: /* * Re-enable the controller after PM. This is not * perfect - think about the case where we were doing * a clock change, and we suspended half-way through. */ if (old_state != C_DISABLE_PM) break; /* fall through */ case C_ENABLE: /* * Power up the LCD screen, enable controller, and * turn on the backlight. */ if (old_state != C_ENABLE) { fbi->state = C_ENABLE; sa1100fb_setup_gpio(fbi); __sa1100fb_lcd_power(fbi, 1); sa1100fb_enable_controller(fbi); __sa1100fb_backlight_power(fbi, 1); } break; } up(&fbi->ctrlr_sem); } /* * Our LCD controller task (which is called when we blank or unblank) * via keventd. */ static void sa1100fb_task(struct work_struct *w) { struct sa1100fb_info *fbi = container_of(w, struct sa1100fb_info, task); u_int state = xchg(&fbi->task_state, -1); set_ctrlr_state(fbi, state); } #ifdef CONFIG_CPU_FREQ /* * Calculate the minimum DMA period over all displays that we own. * This, together with the SDRAM bandwidth defines the slowest CPU * frequency that can be selected. */ static unsigned int sa1100fb_min_dma_period(struct sa1100fb_info *fbi) { #if 0 unsigned int min_period = (unsigned int)-1; int i; for (i = 0; i < MAX_NR_CONSOLES; i++) { struct display *disp = &fb_display[i]; unsigned int period; /* * Do we own this display? */ if (disp->fb_info != &fbi->fb) continue; /* * Ok, calculate its DMA period */ period = sa1100fb_display_dma_period(&disp->var); if (period < min_period) min_period = period; } return min_period; #else /* * FIXME: we need to verify _all_ consoles. */ return sa1100fb_display_dma_period(&fbi->fb.var); #endif } /* * CPU clock speed change handler. We need to adjust the LCD timing * parameters when the CPU clock is adjusted by the power management * subsystem. */ static int sa1100fb_freq_transition(struct notifier_block *nb, unsigned long val, void *data) { struct sa1100fb_info *fbi = TO_INF(nb, freq_transition); struct cpufreq_freqs *f = data; u_int pcd; switch (val) { case CPUFREQ_PRECHANGE: set_ctrlr_state(fbi, C_DISABLE_CLKCHANGE); break; case CPUFREQ_POSTCHANGE: pcd = get_pcd(fbi->fb.var.pixclock, f->new); fbi->reg_lccr3 = (fbi->reg_lccr3 & ~0xff) | LCCR3_PixClkDiv(pcd); set_ctrlr_state(fbi, C_ENABLE_CLKCHANGE); break; } return 0; } static int sa1100fb_freq_policy(struct notifier_block *nb, unsigned long val, void *data) { struct sa1100fb_info *fbi = TO_INF(nb, freq_policy); struct cpufreq_policy *policy = data; switch (val) { case CPUFREQ_ADJUST: case CPUFREQ_INCOMPATIBLE: printk(KERN_DEBUG "min dma period: %d ps, " "new clock %d kHz\n", sa1100fb_min_dma_period(fbi), policy->max); /* todo: fill in min/max values */ break; case CPUFREQ_NOTIFY: do {} while(0); /* todo: panic if min/max values aren't fulfilled * [can't really happen unless there's a bug in the * CPU policy verififcation process * */ break; } return 0; } #endif #ifdef CONFIG_PM /* * Power management hooks. Note that we won't be called from IRQ context, * unlike the blank functions above, so we may sleep. */ static int sa1100fb_suspend(struct platform_device *dev, pm_message_t state) { struct sa1100fb_info *fbi = platform_get_drvdata(dev); set_ctrlr_state(fbi, C_DISABLE_PM); return 0; } static int sa1100fb_resume(struct platform_device *dev) { struct sa1100fb_info *fbi = platform_get_drvdata(dev); set_ctrlr_state(fbi, C_ENABLE_PM); return 0; } #else #define sa1100fb_suspend NULL #define sa1100fb_resume NULL #endif /* * sa1100fb_map_video_memory(): * Allocates the DRAM memory for the frame buffer. This buffer is * remapped into a non-cached, non-buffered, memory region to * allow palette and pixel writes to occur without flushing the * cache. Once this area is remapped, all virtual memory * access to the video memory should occur at the new region. */ static int __init sa1100fb_map_video_memory(struct sa1100fb_info *fbi) { /* * We reserve one page for the palette, plus the size * of the framebuffer. */ fbi->map_size = PAGE_ALIGN(fbi->fb.fix.smem_len + PAGE_SIZE); fbi->map_cpu = dma_alloc_writecombine(fbi->dev, fbi->map_size, &fbi->map_dma, GFP_KERNEL); if (fbi->map_cpu) { fbi->fb.screen_base = fbi->map_cpu + PAGE_SIZE; fbi->screen_dma = fbi->map_dma + PAGE_SIZE; /* * FIXME: this is actually the wrong thing to place in * smem_start. But fbdev suffers from the problem that * it needs an API which doesn't exist (in this case, * dma_writecombine_mmap) */ fbi->fb.fix.smem_start = fbi->screen_dma; } return fbi->map_cpu ? 0 : -ENOMEM; } /* Fake monspecs to fill in fbinfo structure */ static struct fb_monspecs monspecs __initdata = { .hfmin = 30000, .hfmax = 70000, .vfmin = 50, .vfmax = 65, }; static struct sa1100fb_info * __init sa1100fb_init_fbinfo(struct device *dev) { struct sa1100fb_mach_info *inf; struct sa1100fb_info *fbi; fbi = kmalloc(sizeof(struct sa1100fb_info) + sizeof(u32) * 16, GFP_KERNEL); if (!fbi) return NULL; memset(fbi, 0, sizeof(struct sa1100fb_info)); fbi->dev = dev; strcpy(fbi->fb.fix.id, SA1100_NAME); fbi->fb.fix.type = FB_TYPE_PACKED_PIXELS; fbi->fb.fix.type_aux = 0; fbi->fb.fix.xpanstep = 0; fbi->fb.fix.ypanstep = 0; fbi->fb.fix.ywrapstep = 0; fbi->fb.fix.accel = FB_ACCEL_NONE; fbi->fb.var.nonstd = 0; fbi->fb.var.activate = FB_ACTIVATE_NOW; fbi->fb.var.height = -1; fbi->fb.var.width = -1; fbi->fb.var.accel_flags = 0; fbi->fb.var.vmode = FB_VMODE_NONINTERLACED; fbi->fb.fbops = &sa1100fb_ops; fbi->fb.flags = FBINFO_DEFAULT; fbi->fb.monspecs = monspecs; fbi->fb.pseudo_palette = (fbi + 1); fbi->rgb[RGB_8] = &rgb_8; fbi->rgb[RGB_16] = &def_rgb_16; inf = sa1100fb_get_machine_info(fbi); /* * People just don't seem to get this. We don't support * anything but correct entries now, so panic if someone * does something stupid. */ if (inf->lccr3 & (LCCR3_VrtSnchL|LCCR3_HorSnchL|0xff) || inf->pixclock == 0) panic("sa1100fb error: invalid LCCR3 fields set or zero " "pixclock."); fbi->max_xres = inf->xres; fbi->fb.var.xres = inf->xres; fbi->fb.var.xres_virtual = inf->xres; fbi->max_yres = inf->yres; fbi->fb.var.yres = inf->yres; fbi->fb.var.yres_virtual = inf->yres; fbi->max_bpp = inf->bpp; fbi->fb.var.bits_per_pixel = inf->bpp; fbi->fb.var.pixclock = inf->pixclock; fbi->fb.var.hsync_len = inf->hsync_len; fbi->fb.var.left_margin = inf->left_margin; fbi->fb.var.right_margin = inf->right_margin; fbi->fb.var.vsync_len = inf->vsync_len; fbi->fb.var.upper_margin = inf->upper_margin; fbi->fb.var.lower_margin = inf->lower_margin; fbi->fb.var.sync = inf->sync; fbi->fb.var.grayscale = inf->cmap_greyscale; fbi->cmap_inverse = inf->cmap_inverse; fbi->cmap_static = inf->cmap_static; fbi->lccr0 = inf->lccr0; fbi->lccr3 = inf->lccr3; fbi->state = C_STARTUP; fbi->task_state = (u_char)-1; fbi->fb.fix.smem_len = fbi->max_xres * fbi->max_yres * fbi->max_bpp / 8; init_waitqueue_head(&fbi->ctrlr_wait); INIT_WORK(&fbi->task, sa1100fb_task); init_MUTEX(&fbi->ctrlr_sem); return fbi; } static int __init sa1100fb_probe(struct platform_device *pdev) { struct sa1100fb_info *fbi; int ret, irq; irq = platform_get_irq(pdev, 0); if (irq < 0) return -EINVAL; if (!request_mem_region(0xb0100000, 0x10000, "LCD")) return -EBUSY; fbi = sa1100fb_init_fbinfo(&pdev->dev); ret = -ENOMEM; if (!fbi) goto failed; /* Initialize video memory */ ret = sa1100fb_map_video_memory(fbi); if (ret) goto failed; ret = request_irq(irq, sa1100fb_handle_irq, IRQF_DISABLED, "LCD", fbi); if (ret) { printk(KERN_ERR "sa1100fb: request_irq failed: %d\n", ret); goto failed; } #ifdef ASSABET_PAL_VIDEO if (machine_is_assabet()) ASSABET_BCR_clear(ASSABET_BCR_LCD_ON); #endif /* * This makes sure that our colour bitfield * descriptors are correctly initialised. */ sa1100fb_check_var(&fbi->fb.var, &fbi->fb); platform_set_drvdata(pdev, fbi); ret = register_framebuffer(&fbi->fb); if (ret < 0) goto err_free_irq; #ifdef CONFIG_CPU_FREQ fbi->freq_transition.notifier_call = sa1100fb_freq_transition; fbi->freq_policy.notifier_call = sa1100fb_freq_policy; cpufreq_register_notifier(&fbi->freq_transition, CPUFREQ_TRANSITION_NOTIFIER); cpufreq_register_notifier(&fbi->freq_policy, CPUFREQ_POLICY_NOTIFIER); #endif /* This driver cannot be unloaded at the moment */ return 0; err_free_irq: free_irq(irq, fbi); failed: platform_set_drvdata(pdev, NULL); kfree(fbi); release_mem_region(0xb0100000, 0x10000); return ret; } static struct platform_driver sa1100fb_driver = { .probe = sa1100fb_probe, .suspend = sa1100fb_suspend, .resume = sa1100fb_resume, .driver = { .name = "sa11x0-fb", }, }; int __init sa1100fb_init(void) { if (fb_get_options("sa1100fb", NULL)) return -ENODEV; return platform_driver_register(&sa1100fb_driver); } int __init sa1100fb_setup(char *options) { #if 0 char *this_opt; if (!options || !*options) return 0; while ((this_opt = strsep(&options, ",")) != NULL) { if (!strncmp(this_opt, "bpp:", 4)) current_par.max_bpp = simple_strtoul(this_opt + 4, NULL, 0); if (!strncmp(this_opt, "lccr0:", 6)) lcd_shadow.lccr0 = simple_strtoul(this_opt + 6, NULL, 0); if (!strncmp(this_opt, "lccr1:", 6)) { lcd_shadow.lccr1 = simple_strtoul(this_opt + 6, NULL, 0); current_par.max_xres = (lcd_shadow.lccr1 & 0x3ff) + 16; } if (!strncmp(this_opt, "lccr2:", 6)) { lcd_shadow.lccr2 = simple_strtoul(this_opt + 6, NULL, 0); current_par.max_yres = (lcd_shadow. lccr0 & LCCR0_SDS) ? ((lcd_shadow. lccr2 & 0x3ff) + 1) * 2 : ((lcd_shadow.lccr2 & 0x3ff) + 1); } if (!strncmp(this_opt, "lccr3:", 6)) lcd_shadow.lccr3 = simple_strtoul(this_opt + 6, NULL, 0); } #endif return 0; } module_init(sa1100fb_init); MODULE_DESCRIPTION("StrongARM-1100/1110 framebuffer driver"); MODULE_LICENSE("GPL");