Skip to contentSkip to conversation

unicore32 machine related files: core files

PATCH In review Guan Xuetao 2 participants 3 messages Feb 16, 2011 – Feb 22, 2011 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

PATCH 8/12 unicore32 machine related files: core files

Message-Id: <15f7e89c92883a77c96f5f3288c9a4afbd68f8e3.1297842537.git.gxt@mprc.pku.edu.cn>
In-Reply-To: <[email protected]>
References: <[email protected]>
From: GuanXuetao <[email protected]>
Date: Sat, 15 Jan 2011 18:24:16 +0800

This patch adds machine related core files, also including build infrastructure.

---
 arch/unicore32/Kconfig.puv3          |  125 ++++++++++++++++
 arch/unicore32/kernel/puv3-core.c    |  270 ++++++++++++++++++++++++++++++++++
 arch/unicore32/kernel/puv3-nb0916.c  |  175 ++++++++++++++++++++++
 arch/unicore32/kernel/puv3-smw0919.c |  115 ++++++++++++++
 4 files changed, 685 insertions(+), 0 deletions(-)
 create mode 100644 arch/unicore32/Kconfig.puv3
 create mode 100644 arch/unicore32/kernel/puv3-core.c
 create mode 100644 arch/unicore32/kernel/puv3-nb0916.c
 create mode 100644 arch/unicore32/kernel/puv3-smw0919.c
arch/unicore32/Kconfig.puv3 new file +125 -0
new file mode 100644
index 0000000..2ef10db
@@ -0,0 +1,125 @@
+#
+# PKUnity v3 Kconfig
+#
+
+if ARCH_PUV3
+
+menu "PKUnity v3 SoC Features"
+
+config PUV3_I2C
+	bool "PKUnity v3 I2C bus support"
+#	default y
+	select I2C
+	select I2C_CHARDEV
+	select I2C_ALGOBIT
+
+config PUV3_UMAL
+	tristate "PKUnity v3 UMAL Gigabit Network Adapter support"
+	select MII
+	select PHYLIB
+
+config PUV3_UNIGFX
+	tristate "PKUnity v3 Unigfx display support"
+	select FB
+	select FB_SYS_FILLRECT
+	select FB_SYS_COPYAREA
+	select FB_SYS_IMAGEBLIT
+	select FB_SYS_FOPS
+	help
+	  Choose this option if you want to use the Unigfx device as a
+	  framebuffer device. Without the support of PCI & AGP.
+
+config PUV3_UNIGFX_HWACCEL
+	bool "PKUnity v3 Unigfx hardware accelerator support"
+	depends on PUV3_UNIGFX
+
+config PUV3_AC97
+	tristate "PKUnity v3 AC97 driver support"
+	select SND_PCM
+	select SND_AC97_CODEC
+	help
+	  Say Y or M if you want to support any AC97 codec attached to
+	  the PKUnity AC97 interface.
+
+#config PUV3_MUSB
+#	bool "PKUnity v3 USB MUSBMHDRC Support"
+#	select USB_MUSB_HDRC_HCD
+#	select USB_MUSB_HOST
+#	select MUSB_PIO_ONLY
+#	select USB_INVENTRA_DMA
+
+#config PUV3_MMC
+#	tristate "PKUnity v3 MMC/SD Card support"
+#	select MMC
+
+#config PUV3_NAND
+#	tristate "PKUnity v3 NAND Flash support"
+#	select MTD
+#	select MTD_PARTITIONS
+#	select MTD_NAND
+#	select MTD_CHAR
+#	select MTD_BLOCK
+
+#config PUV3_NAND_CHIPNR
+#	int "PKUnity v3 NAND Flash Chip number (1-4)"
+#	range 1 4
+#	depends on PUV3_NAND
+#	default "1"
+
+#config PUV3_UART
+#	bool "PKUnity v3 serial port support"
+#	select SERIAL_CORE
+
+#config PUV3_UART_CONSOLE
+#	bool "Console on PKUnity serial port"
+#	depends on PUV3_UART
+#	select SERIAL_CORE_CONSOLE
+#	help
+#	  Even if you say Y here, the currently visible virtual console
+#	  (/dev/tty0) will still be used as the system console by default, but
+#	  you can alter that using a kernel command line option such as
+#	  "console=ttySA0". (Try "man bootparam" or see the documentation of
+#	  your boot loader (lilo or loadlin) about how to pass options to the
+#	  kernel at boot time.)
+
+#config PUV3_SPI
+#	bool "PKUnity v3 SPI controller support"
+#	select SPI
+#	select SPI_MASTER
+
+endmenu
+
+if PUV3_NB0916
+
+menu "PKUnity NetBook-0916 Features"
+
+config I2C_BATTERY_BQ27200
+	tristate "I2C Battery BQ27200 Support"
+	select PUV3_I2C
+	select POWER_SUPPLY
+	select BATTERY_BQ27x00
+
+config I2C_EEPROM_AT24
+	tristate "I2C EEPROMs AT24 support"
+	select PUV3_I2C
+	select MISC_DEVICES
+	select EEPROM_AT24
+
+config LCD_BACKLIGHT
+	tristate "LCD Backlight support"
+	select BACKLIGHT_LCD_SUPPORT
+	select BACKLIGHT_PWM
+
+#config USB_WLAN_HED_AQ3
+#	tristate "HED Wireless Interface Card"
+#	select WIRELESS_EXT
+#	select WIRELESS_EXT_SYSFS
+
+#config USB_CMMB_INNOFIDEI
+#	tristate "Innofidei cmmb dongle"
+
+endmenu
+
+endif
+
+endif
arch/unicore32/kernel/puv3-core.c new file +270 -0

270 lines not on this page · raw message

arch/unicore32/kernel/puv3-nb0916.c new file +175 -0

175 lines not on this page · raw message

arch/unicore32/kernel/puv3-smw0919.c new file +115 -0

115 lines not on this page · raw message

Signature · 1 line
1.6.2.2
maintainer
#1 lore raw
Quoted 5 lines · Guan Xuetao

Message-Id: <15f7e89c92883a77c96f5f3288c9a4afbd68f8e3.1297842537.git.gxt@mprc.pku.edu.cn>
In-Reply-To: <[email protected]>
References: <[email protected]>
From: GuanXuetao <[email protected]>
Date: Sat, 15 Jan 2011 18:24:16 +0800

These headers should not be here. When using git-send-email, this will be handled automatically, but if you send the patch from a regular email client application, you should remove them manually.

Quoted 16 lines
arch/unicore32/Kconfig.puv3 new file +10 -0
new file mode 100644
index 0000000..2ef10db
@@ -0,0 +1,125 @@
+#
+# PKUnity v3 Kconfig
+#
+
+if ARCH_PUV3
+
+menu "PKUnity v3 SoC Features"
+
+config PUV3_I2C
+	bool "PKUnity v3 I2C bus support"

arch/unicore32/Kconfig.puv3 line 19

Quoted 10 lines
arch/unicore32/Kconfig.puv3 new file +9 -0
+#	default y
+	select I2C
+	select I2C_CHARDEV
+	select I2C_ALGOBIT
+
+config PUV3_UMAL
+	tristate "PKUnity v3 UMAL Gigabit Network Adapter support"
+	select MII
+	select PHYLIB
...

Generally, everything in this file should be moved to other files. The rule is that the Kconfig entry belongs into the same directory as the Makefile referencing it. E.g. the two above should be in drivers/i2c/busses/Kconfig and drivers/net/Kconfig, and in the same patch as the actual device driver.

Quoted 5 lines
arch/unicore32/Kconfig.puv3 new file +5 -0
+
+static struct platform_device nb0916_device_gpio_button = {
+	.name	= "gpio-keys",
+	.id	= -1,
+	.dev	= {

arch/unicore32/Kconfig.puv3

Quoted 10 lines
arch/unicore32/Kconfig.puv3 new file +10 -0
+		.platform_data = &nb0916_gpio_button_data,
+	},
+};
+
+static struct platform_device *mach_nb0916_devices[] __initdata = {
+	&puv3_device_i2c,
+	&physmap_flash,
+	&nb0916_device_backlight,
+	&nb0916_device_gpio_button,
+};

Static platform devices are no longer recommended. You can change these to use platform_device_register_simple() or a variant of it.

If you plan to convert the entire architecture to use a flattened device tree as we discussed in an earlier review, you don't need to bother with this now, because the entire platform device registration you have here can then be removed.

Arnd

#2 lore raw
Quoted 72 lines

-----Original Message-----
From: Arnd Bergmann [mailto:[email protected]]
Sent: Friday, February 18, 2011 1:40 AM
To: Guan Xuetao
Cc: [email protected]; [email protected]; 'Greg KH'
Subject: Re: [PATCH 08/12] unicore32 machine related files: core files

Quoted 5 lines · Guan Xuetao

Message-Id: <15f7e89c92883a77c96f5f3288c9a4afbd68f8e3.1297842537.git.gxt@mprc.pku.edu.cn>
In-Reply-To: <[email protected]>
References: <[email protected]>
From: GuanXuetao <[email protected]>
Date: Sat, 15 Jan 2011 18:24:16 +0800

These headers should not be here. When using git-send-email, this will be handled automatically, but if you send the patch from a regular email client application, you should remove them manually.

Quoted 16 lines
arch/unicore32/Kconfig.puv3 new file +10 -0
new file mode 100644
index 0000000..2ef10db
@@ -0,0 +1,125 @@
+#
+# PKUnity v3 Kconfig
+#
+
+if ARCH_PUV3
+
+menu "PKUnity v3 SoC Features"
+
+config PUV3_I2C
+	bool "PKUnity v3 I2C bus support"

arch/unicore32/Kconfig.puv3 line 19

Quoted 10 lines
arch/unicore32/Kconfig.puv3 new file +9 -0
+#	default y
+	select I2C
+	select I2C_CHARDEV
+	select I2C_ALGOBIT
+
+config PUV3_UMAL
+	tristate "PKUnity v3 UMAL Gigabit Network Adapter support"
+	select MII
+	select PHYLIB
...

Generally, everything in this file should be moved to other files. The rule is that the Kconfig entry belongs into the same directory as the Makefile referencing it. E.g. the two above should be in drivers/i2c/busses/Kconfig and drivers/net/Kconfig, and in the same patch as the actual device driver.

Quoted 5 lines
arch/unicore32/Kconfig.puv3 new file +5 -0
+
+static struct platform_device nb0916_device_gpio_button = {
+	.name	= "gpio-keys",
+	.id	= -1,
+	.dev	= {

arch/unicore32/Kconfig.puv3

Quoted 10 lines
arch/unicore32/Kconfig.puv3 new file +10 -0
+		.platform_data = &nb0916_gpio_button_data,
+	},
+};
+
+static struct platform_device *mach_nb0916_devices[] __initdata = {
+	&puv3_device_i2c,
+	&physmap_flash,
+	&nb0916_device_backlight,
+	&nb0916_device_gpio_button,
+};

Static platform devices are no longer recommended. You can change these to use platform_device_register_simple() or a variant of it.

Quoted 4 lines

If you plan to convert the entire architecture to use a flattened device tree as we discussed in an earlier review, you don't need to bother with this now, because the entire platform device registration you have here can then be removed.

Above two files are no used in new reviewed version, and they were removed.

Quoted 2 lines

Arnd

Thanks Arnd

Guan Xuetao