From: Wu Zhangjin <wuzhangjin@xxxxxxxxx> This patchset add basic support for lemote loongson2f machines, including fuloong2f mini box, yeeloong2f netbook and mengloong2f netbook. All of the lemote loongson2f family machines utilize the 2f revision of loongson processor and the AMD cs5536 south bridge. The differences among these machines are very small, the most important part should be the reset/shutdown logic. so, it's possible to share the same kernel image among them, this patchset really does it! And of course, there are some other differences between the box and the netbook: 1. the netbook has a sm712 video card, whose driver is not in the mainline yet, if you only need the X window, there is an existing driver in X. but if you need a console, please add the sm712 video driver in the next patchset. This video driver is not ready to upstream but we will try to push it into drivers/staging asap. 2. the netbook has an Embedded Controller(kb3310b), which helps to do reset/shutdown management, power supply/battery management, hotkey management, display management and so forth. The corresponding platform drivers will come later. 3. the netbook has a rtl8187b wifi netcard, there is an existing driver in the mainline, but the performance is not good(and seems no rfkill support there), a better one is maintained outside the mainline and it's not that easy to upstream, but we will try it later. And what about the common parts among them: 1. cpufreq support the cpu frequency of loongson2f is software configurable(8 levels), and there is an existing external mfgpt timer provided by cs5536, So, a cpufreq dirver for loongson2f is also ready there, will come later. 2. standby support also benefit from the above feature of loongson2f, when we put loongson2f into ZERO frequency(wait mode), it will save about 2w for us, and wait there until an external interrupt take place. So, it's possible to add standby support to loongson2f family machines. the relative patches will also come later. (This -v1 patch incorporates the feedbacks from Ralf & Arnaud Patard, the main change is putting all of the loongson2f machines into lemote-2f and hope this will make the linux distributions happy!) Thanks & Regards, Wu Zhangjin Wu Zhangjin (7): [loongson] lemote-2f: add lemote loongson2f family machines support [loongson] lemote-2f: rtc: enable legacy RTC driver [loongson] lemote-2f: add basic cs5536 vsm support [loongson] lemote-2f: add pci support [loongson] lemote-2f: add irq support [loongson] lemote-2f: add reset and shutdown support [loongson] lemote-2f: add defconfig file arch/mips/Kconfig | 2 +- arch/mips/Makefile | 1 + arch/mips/configs/lemote2f_defconfig | 1794 ++++++++++++++++++++ .../mips/include/asm/mach-loongson/cs5536/cs5536.h | 305 ++++ .../include/asm/mach-loongson/cs5536/cs5536_pci.h | 153 ++ .../include/asm/mach-loongson/cs5536/cs5536_vsm.h | 31 + arch/mips/include/asm/mach-loongson/loongson.h | 7 + arch/mips/include/asm/mach-loongson/machine.h | 7 + arch/mips/loongson/Kconfig | 32 + arch/mips/loongson/Makefile | 6 + arch/mips/loongson/common/Makefile | 6 + arch/mips/loongson/common/cs5536/Makefile | 8 + arch/mips/loongson/common/cs5536/cs5536_acc.c | 148 ++ arch/mips/loongson/common/cs5536/cs5536_ehci.c | 158 ++ arch/mips/loongson/common/cs5536/cs5536_ide.c | 185 ++ arch/mips/loongson/common/cs5536/cs5536_isa.c | 316 ++++ arch/mips/loongson/common/cs5536/cs5536_ohci.c | 153 ++ arch/mips/loongson/common/cs5536/cs5536_pci.c | 87 + arch/mips/loongson/lemote-2f/Makefile | 5 + arch/mips/loongson/lemote-2f/irq.c | 130 ++ arch/mips/loongson/lemote-2f/reset.c | 163 ++ arch/mips/pci/Makefile | 3 +- arch/mips/pci/fixup-lemote2f.c | 162 ++ arch/mips/pci/ops-fuloong2e.c | 154 -- arch/mips/pci/ops-loongson2.c | 208 +++ 25 files changed, 4068 insertions(+), 156 deletions(-) create mode 100644 arch/mips/configs/lemote2f_defconfig create mode 100644 arch/mips/include/asm/mach-loongson/cs5536/cs5536.h create mode 100644 arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h create mode 100644 arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h create mode 100644 arch/mips/loongson/common/cs5536/Makefile create mode 100644 arch/mips/loongson/common/cs5536/cs5536_acc.c create mode 100644 arch/mips/loongson/common/cs5536/cs5536_ehci.c create mode 100644 arch/mips/loongson/common/cs5536/cs5536_ide.c create mode 100644 arch/mips/loongson/common/cs5536/cs5536_isa.c create mode 100644 arch/mips/loongson/common/cs5536/cs5536_ohci.c create mode 100644 arch/mips/loongson/common/cs5536/cs5536_pci.c create mode 100644 arch/mips/loongson/lemote-2f/Makefile create mode 100644 arch/mips/loongson/lemote-2f/irq.c create mode 100644 arch/mips/loongson/lemote-2f/reset.c create mode 100644 arch/mips/pci/fixup-lemote2f.c delete mode 100644 arch/mips/pci/ops-fuloong2e.c create mode 100644 arch/mips/pci/ops-loongson2.c