RE: [RFC PATCH 0/3] ACPI: ARM AMBA bus connector resource

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is the proposed ASL format appropriate? I recognize that the ASL definitions for these devices must be standardized across all ARM ACPI platform definitions if we want the software to work consistently, so this is an important aspect to agree upon.

How about contrasting it with an alternative where each device has _HID of "AMBA0000" and there's no top-level 'Device (AMBA)'? This would mean that all the devices would be labeled by ACPI subsystem as "AMBA0000:NN" instead of "device:NN". However, with this solution there would be no easy way to define a default clock. See example below.

Brandon

---

Alternative ASL #2:


	Device (KMI0) {
		Name (_HID, "AMBA0000")
		Name (_UID, 0)
		Name (_ADR,0x1c060000)
		Method(_CRS, ... ) {
			...
		}
		Method(_DSM, 4, NotSerialized) {
			Store (Package (6)
			{
				"clock-name", "KMIREFCLK", "\\_SB_.CLK0",
				"clock-name", "apb_pclk", "\\_SB_.CLK0",
			}, Local0)
			Return (Local0)
		}
	}
	
	...

	Device (SER0) {
		Name (_HID, "AMBA0000")
		Name (_UID, 2)
		Name (_ADR,0x1c090000)
		Method(_CRS, ... ) {
			...
		}
		Method(_DSM, 4, NotSerialized) {
			Store (Package (3)
			{
				"clock-name", "apb_pclk", "\\_SB_.CLK0",
			}, Local0)
			Return (Local0)
		}
	}
	


-----Original Message-----
From: brandon.anderson@xxxxxxx [mailto:brandon.anderson@xxxxxxx] 
Sent: Monday, October 21, 2013 7:34 PM
To: linaro-acpi@xxxxxxxxxxxxxxxx; linux-acpi@xxxxxxxxxxxxxxx
Cc: lenb@xxxxxxxxxx; rjw@xxxxxxx; naresh.bhat@xxxxxxxxxx; hanjun.guo@xxxxxxxxxx; graeme.gregory@xxxxxxxxxx; Suthikulpanit, Suravee; Anderson, Brandon
Subject: [RFC PATCH 0/3] ACPI: ARM AMBA bus connector resource

From: Brandon Anderson <brandon.anderson@xxxxxxx>

This is a proposal for ACPI driver probing of the ARM AMBA devices currently listed under ‘iofpga’ in the RTSM dts file. The main addition is drivers/amba/acpi.c which fits the role of an AMBA bus ‘connector resource’ for ACPI using struct amba_device.

I have not yet figured out the implementation details regarding clocks (handled in the dts file with clock-names). However, I have included a proposed ASL format for clock information in the DSDT example below. With the last patch that hacks the clock info, this prototype will run on the Foundation and RTSM models.

These patches require Hanjun’s fixed-clock patches to be applied first on top of a Linaro ACPI kernel: https://git.linaro.org/gitweb?p=arm/acpi/leg-kernel.git;a=summary

Please comment on both the concept and the implementation.

Brandon Anderson (3):
  Remove UART and KMI entries from DTS file
  Prototype of AMBA bus 'connector resource' for ACPI
  Hack clock names to get prototype running

 arch/arm64/boot/dts/foundation-v8-acpi.dts        |   10 +-
 arch/arm64/boot/dts/rtsm_ve-aemv8a-acpi.dts       |    4 +
 arch/arm64/boot/dts/rtsm_ve-motherboard-acpi.dtsi |    4 +
 drivers/acpi/acpi_platform.c                      |    2 +
 drivers/amba/Makefile                             |    2 +-
 drivers/amba/acpi.c                               |  172 +++++++++++++++++++++
 drivers/clk/clk-fixed-rate.c                      |   15 +-
 7 files changed, 203 insertions(+), 6 deletions(-)  create mode 100644 drivers/amba/acpi.c

--
1.7.9.5


---

		Device (AMBA) {
			Name (_HID, "AMBA0000") /* the parallel to "arm,primecell" in DTS */
			Name (_UID, 0)

			/* Define 'apb_pclk' as a default clock source since it is
			   common with devices below */
			Method(_DSM, 4, NotSerialized) {
				Store (Package (3)
				{
					"clock-name", "apb_pclk", "\\_SB_.CLK0",
				}, Local0)

				Return (Local0)
			}

			Device (KMI0) {
				Name (_ADR,0x1c060000)
				Method (_CRS, 0x0, Serialized) {
					Name (RBUF, ResourceTemplate () {
						Memory32Fixed (ReadWrite, 0x1c060000, 0x00010000)
						Interrupt (ResourceConsumer, Edge, ActiveBoth,
								Exclusive, , , ) {44}
					})
					Return (RBUF)
				}
			}

			Device (KMI1) {
				Name (_ADR,0x1c070000)
				Method (_CRS, 0x0, Serialized) {
					Name (RBUF, ResourceTemplate () {
						Memory32Fixed (ReadWrite, 0x1c070000, 0x00010000)
						Interrupt (ResourceConsumer, Edge, ActiveBoth,
								Exclusive, , , ) {45}
					})
					Return (RBUF)
				}
			}

			Device (SER0) {
				Name (_ADR,0x1c090000)                         // UART0
				Method (_CRS, 0x0, Serialized) {
					Name (RBUF, ResourceTemplate () {
						Memory32Fixed (ReadWrite, 0x1c090000, 0x00010000)
						Interrupt (ResourceConsumer, Edge, ActiveBoth,
								Exclusive, , , ) {37}
					})
					Return (RBUF)
				}
			}

			Device (SER1) {
				Name (_ADR,0x1c0a0000)                         // UART1
				Method (_CRS, 0x0, Serialized) {
					Name (RBUF, ResourceTemplate () {
						Memory32Fixed (ReadWrite, 0x1c0a0000, 0x00010000)
						Interrupt (ResourceConsumer, Edge, ActiveBoth,
								Exclusive, , , ) {38}
					})
					Return (RBUF)
				}
			}
			Device (SER2) {
				Name (_ADR,0x1c0b0000)                         // UART2
				Method (_CRS, 0x0, Serialized) {
					Name (RBUF, ResourceTemplate () {
						Memory32Fixed (ReadWrite, 0x1c0b0000, 0x00010000)
						Interrupt (ResourceConsumer, Edge, ActiveBoth,
								Exclusive, , , ) {39}
					})
					Return (RBUF)
				}
			}

			Device (SER3) {
				Name (_ADR,0x1c0c0000)                         // UART3
				Method (_CRS, 0x0, Serialized) {
					Name (RBUF, ResourceTemplate () {
						Memory32Fixed (ReadWrite, 0x1c0c0000, 0x00010000)
						Interrupt (ResourceConsumer, Edge, ActiveBoth,
								Exclusive, , , ) {40}
					})
					Return (RBUF)
				}
			}
		}

��.n��������+%������w��{.n�����{�����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux