0011-mb-dell-Convert-E6400-into-a-variant.patch 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. From b8f59282b8332151b302db8e2beb25f2b8998a40 Mon Sep 17 00:00:00 2001
  2. From: Nicholas Chin <nic.c3.14@gmail.com>
  3. Date: Thu, 26 Sep 2024 19:48:26 -0600
  4. Subject: [PATCH 11/18] mb/dell: Convert E6400 into a variant
  5. All the GM45 Dell Latitudes should be nearly identical, so convert the
  6. E6400 port into a variant so that future ports for the other systems can
  7. share code with each other.
  8. Change-Id: I8094fce56eaaadb20aef173644cd3b2c0b008e95
  9. Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
  10. ---
  11. src/mainboard/dell/e6400/Makefile.mk | 10 --------
  12. .../dell/{e6400 => gm45_latitude}/Kconfig | 22 +++++++++++++-----
  13. .../{e6400 => gm45_latitude}/Kconfig.name | 0
  14. src/mainboard/dell/gm45_latitude/Makefile.mk | 11 +++++++++
  15. .../dell/{e6400 => gm45_latitude}/acpi/ec.asl | 0
  16. .../acpi/ich9_pci_irqs.asl | 0
  17. .../{e6400 => gm45_latitude}/acpi/superio.asl | 0
  18. .../dell/{e6400 => gm45_latitude}/blc.c | 0
  19. .../{e6400 => gm45_latitude}/board_info.txt | 0
  20. .../dell/{e6400 => gm45_latitude}/bootblock.c | 0
  21. .../{e6400 => gm45_latitude}/cmos.default | 0
  22. .../dell/{e6400 => gm45_latitude}/cmos.layout | 0
  23. .../dell/{e6400 => gm45_latitude}/cstates.c | 0
  24. .../{e6400 => gm45_latitude}/devicetree.cb | 1 -
  25. .../dell/{e6400 => gm45_latitude}/dsdt.asl | 0
  26. .../dell/{e6400 => gm45_latitude}/mainboard.c | 0
  27. .../dell/{e6400 => gm45_latitude}/romstage.c | 0
  28. .../variants}/e6400/data.vbt | Bin
  29. .../variants}/e6400/gma-mainboard.ads | 0
  30. .../{ => gm45_latitude/variants}/e6400/gpio.c | 0
  31. .../variants}/e6400/hda_verb.c | 0
  32. .../variants/e6400/overridetree.cb | 7 ++++++
  33. 22 files changed, 34 insertions(+), 17 deletions(-)
  34. delete mode 100644 src/mainboard/dell/e6400/Makefile.mk
  35. rename src/mainboard/dell/{e6400 => gm45_latitude}/Kconfig (64%)
  36. rename src/mainboard/dell/{e6400 => gm45_latitude}/Kconfig.name (100%)
  37. create mode 100644 src/mainboard/dell/gm45_latitude/Makefile.mk
  38. rename src/mainboard/dell/{e6400 => gm45_latitude}/acpi/ec.asl (100%)
  39. rename src/mainboard/dell/{e6400 => gm45_latitude}/acpi/ich9_pci_irqs.asl (100%)
  40. rename src/mainboard/dell/{e6400 => gm45_latitude}/acpi/superio.asl (100%)
  41. rename src/mainboard/dell/{e6400 => gm45_latitude}/blc.c (100%)
  42. rename src/mainboard/dell/{e6400 => gm45_latitude}/board_info.txt (100%)
  43. rename src/mainboard/dell/{e6400 => gm45_latitude}/bootblock.c (100%)
  44. rename src/mainboard/dell/{e6400 => gm45_latitude}/cmos.default (100%)
  45. rename src/mainboard/dell/{e6400 => gm45_latitude}/cmos.layout (100%)
  46. rename src/mainboard/dell/{e6400 => gm45_latitude}/cstates.c (100%)
  47. rename src/mainboard/dell/{e6400 => gm45_latitude}/devicetree.cb (98%)
  48. rename src/mainboard/dell/{e6400 => gm45_latitude}/dsdt.asl (100%)
  49. rename src/mainboard/dell/{e6400 => gm45_latitude}/mainboard.c (100%)
  50. rename src/mainboard/dell/{e6400 => gm45_latitude}/romstage.c (100%)
  51. rename src/mainboard/dell/{ => gm45_latitude/variants}/e6400/data.vbt (100%)
  52. rename src/mainboard/dell/{ => gm45_latitude/variants}/e6400/gma-mainboard.ads (100%)
  53. rename src/mainboard/dell/{ => gm45_latitude/variants}/e6400/gpio.c (100%)
  54. rename src/mainboard/dell/{ => gm45_latitude/variants}/e6400/hda_verb.c (100%)
  55. create mode 100644 src/mainboard/dell/gm45_latitude/variants/e6400/overridetree.cb
  56. diff --git a/src/mainboard/dell/e6400/Makefile.mk b/src/mainboard/dell/e6400/Makefile.mk
  57. deleted file mode 100644
  58. index ca3a82db48..0000000000
  59. --- a/src/mainboard/dell/e6400/Makefile.mk
  60. +++ /dev/null
  61. @@ -1,10 +0,0 @@
  62. -## SPDX-License-Identifier: GPL-2.0-only
  63. -
  64. -bootblock-y += bootblock.c
  65. -
  66. -romstage-y += gpio.c
  67. -
  68. -ramstage-y += cstates.c
  69. -ramstage-y += blc.c
  70. -
  71. -ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
  72. diff --git a/src/mainboard/dell/e6400/Kconfig b/src/mainboard/dell/gm45_latitude/Kconfig
  73. similarity index 64%
  74. rename from src/mainboard/dell/e6400/Kconfig
  75. rename to src/mainboard/dell/gm45_latitude/Kconfig
  76. index 6fe1b1c456..ba76fb6e8c 100644
  77. --- a/src/mainboard/dell/e6400/Kconfig
  78. +++ b/src/mainboard/dell/gm45_latitude/Kconfig
  79. @@ -1,9 +1,7 @@
  80. ## SPDX-License-Identifier: GPL-2.0-only
  81. -if BOARD_DELL_E6400
  82. -
  83. -config BOARD_SPECIFIC_OPTIONS
  84. - def_bool y
  85. +config BOARD_DELL_GM45_LATITUDE_COMMON
  86. + def_bool n
  87. select SYSTEM_TYPE_LAPTOP
  88. select CPU_INTEL_SOCKET_P
  89. select NORTHBRIDGE_INTEL_GM45
  90. @@ -19,19 +17,31 @@ config BOARD_SPECIFIC_OPTIONS
  91. select INTEL_GMA_HAVE_VBT
  92. select EC_DELL_MEC5035
  93. +
  94. +config BOARD_DELL_E6400
  95. + select BOARD_DELL_GM45_LATITUDE_COMMON
  96. +
  97. +if BOARD_DELL_GM45_LATITUDE_COMMON
  98. +
  99. config INTEL_GMA_DPLL_REF_FREQ
  100. default 100000000
  101. config MAINBOARD_DIR
  102. - default "dell/e6400"
  103. + default "dell/gm45_latitude"
  104. config MAINBOARD_PART_NUMBER
  105. default "Latitude E6400" if BOARD_DELL_E6400
  106. +config OVERRIDE_DEVICETREE
  107. + default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb"
  108. +
  109. +config VARIANT_DIR
  110. + default "e6400" if BOARD_DELL_E6400
  111. +
  112. config USBDEBUG_HCD_INDEX
  113. default 1
  114. config CBFS_SIZE
  115. default 0x1A0000
  116. -endif # BOARD_DELL_E6400
  117. +endif # BOARD_DELL_GM45_LATITUDE_COMMON
  118. diff --git a/src/mainboard/dell/e6400/Kconfig.name b/src/mainboard/dell/gm45_latitude/Kconfig.name
  119. similarity index 100%
  120. rename from src/mainboard/dell/e6400/Kconfig.name
  121. rename to src/mainboard/dell/gm45_latitude/Kconfig.name
  122. diff --git a/src/mainboard/dell/gm45_latitude/Makefile.mk b/src/mainboard/dell/gm45_latitude/Makefile.mk
  123. new file mode 100644
  124. index 0000000000..5295d5be22
  125. --- /dev/null
  126. +++ b/src/mainboard/dell/gm45_latitude/Makefile.mk
  127. @@ -0,0 +1,11 @@
  128. +## SPDX-License-Identifier: GPL-2.0-only
  129. +
  130. +bootblock-y += bootblock.c
  131. +
  132. +romstage-y += variants/$(VARIANT_DIR)/gpio.c
  133. +
  134. +ramstage-y += cstates.c
  135. +ramstage-y += blc.c
  136. +ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c
  137. +
  138. +ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads
  139. diff --git a/src/mainboard/dell/e6400/acpi/ec.asl b/src/mainboard/dell/gm45_latitude/acpi/ec.asl
  140. similarity index 100%
  141. rename from src/mainboard/dell/e6400/acpi/ec.asl
  142. rename to src/mainboard/dell/gm45_latitude/acpi/ec.asl
  143. diff --git a/src/mainboard/dell/e6400/acpi/ich9_pci_irqs.asl b/src/mainboard/dell/gm45_latitude/acpi/ich9_pci_irqs.asl
  144. similarity index 100%
  145. rename from src/mainboard/dell/e6400/acpi/ich9_pci_irqs.asl
  146. rename to src/mainboard/dell/gm45_latitude/acpi/ich9_pci_irqs.asl
  147. diff --git a/src/mainboard/dell/e6400/acpi/superio.asl b/src/mainboard/dell/gm45_latitude/acpi/superio.asl
  148. similarity index 100%
  149. rename from src/mainboard/dell/e6400/acpi/superio.asl
  150. rename to src/mainboard/dell/gm45_latitude/acpi/superio.asl
  151. diff --git a/src/mainboard/dell/e6400/blc.c b/src/mainboard/dell/gm45_latitude/blc.c
  152. similarity index 100%
  153. rename from src/mainboard/dell/e6400/blc.c
  154. rename to src/mainboard/dell/gm45_latitude/blc.c
  155. diff --git a/src/mainboard/dell/e6400/board_info.txt b/src/mainboard/dell/gm45_latitude/board_info.txt
  156. similarity index 100%
  157. rename from src/mainboard/dell/e6400/board_info.txt
  158. rename to src/mainboard/dell/gm45_latitude/board_info.txt
  159. diff --git a/src/mainboard/dell/e6400/bootblock.c b/src/mainboard/dell/gm45_latitude/bootblock.c
  160. similarity index 100%
  161. rename from src/mainboard/dell/e6400/bootblock.c
  162. rename to src/mainboard/dell/gm45_latitude/bootblock.c
  163. diff --git a/src/mainboard/dell/e6400/cmos.default b/src/mainboard/dell/gm45_latitude/cmos.default
  164. similarity index 100%
  165. rename from src/mainboard/dell/e6400/cmos.default
  166. rename to src/mainboard/dell/gm45_latitude/cmos.default
  167. diff --git a/src/mainboard/dell/e6400/cmos.layout b/src/mainboard/dell/gm45_latitude/cmos.layout
  168. similarity index 100%
  169. rename from src/mainboard/dell/e6400/cmos.layout
  170. rename to src/mainboard/dell/gm45_latitude/cmos.layout
  171. diff --git a/src/mainboard/dell/e6400/cstates.c b/src/mainboard/dell/gm45_latitude/cstates.c
  172. similarity index 100%
  173. rename from src/mainboard/dell/e6400/cstates.c
  174. rename to src/mainboard/dell/gm45_latitude/cstates.c
  175. diff --git a/src/mainboard/dell/e6400/devicetree.cb b/src/mainboard/dell/gm45_latitude/devicetree.cb
  176. similarity index 98%
  177. rename from src/mainboard/dell/e6400/devicetree.cb
  178. rename to src/mainboard/dell/gm45_latitude/devicetree.cb
  179. index bb954cbd7b..5919803be2 100644
  180. --- a/src/mainboard/dell/e6400/devicetree.cb
  181. +++ b/src/mainboard/dell/gm45_latitude/devicetree.cb
  182. @@ -15,7 +15,6 @@ chip northbridge/intel/gm45
  183. register "pci_mmio_size" = "2048"
  184. device domain 0 on
  185. - subsystemid 0x1028 0x0233 inherit
  186. ops gm45_pci_domain_ops
  187. device pci 00.0 on end # host bridge
  188. diff --git a/src/mainboard/dell/e6400/dsdt.asl b/src/mainboard/dell/gm45_latitude/dsdt.asl
  189. similarity index 100%
  190. rename from src/mainboard/dell/e6400/dsdt.asl
  191. rename to src/mainboard/dell/gm45_latitude/dsdt.asl
  192. diff --git a/src/mainboard/dell/e6400/mainboard.c b/src/mainboard/dell/gm45_latitude/mainboard.c
  193. similarity index 100%
  194. rename from src/mainboard/dell/e6400/mainboard.c
  195. rename to src/mainboard/dell/gm45_latitude/mainboard.c
  196. diff --git a/src/mainboard/dell/e6400/romstage.c b/src/mainboard/dell/gm45_latitude/romstage.c
  197. similarity index 100%
  198. rename from src/mainboard/dell/e6400/romstage.c
  199. rename to src/mainboard/dell/gm45_latitude/romstage.c
  200. diff --git a/src/mainboard/dell/e6400/data.vbt b/src/mainboard/dell/gm45_latitude/variants/e6400/data.vbt
  201. similarity index 100%
  202. rename from src/mainboard/dell/e6400/data.vbt
  203. rename to src/mainboard/dell/gm45_latitude/variants/e6400/data.vbt
  204. diff --git a/src/mainboard/dell/e6400/gma-mainboard.ads b/src/mainboard/dell/gm45_latitude/variants/e6400/gma-mainboard.ads
  205. similarity index 100%
  206. rename from src/mainboard/dell/e6400/gma-mainboard.ads
  207. rename to src/mainboard/dell/gm45_latitude/variants/e6400/gma-mainboard.ads
  208. diff --git a/src/mainboard/dell/e6400/gpio.c b/src/mainboard/dell/gm45_latitude/variants/e6400/gpio.c
  209. similarity index 100%
  210. rename from src/mainboard/dell/e6400/gpio.c
  211. rename to src/mainboard/dell/gm45_latitude/variants/e6400/gpio.c
  212. diff --git a/src/mainboard/dell/e6400/hda_verb.c b/src/mainboard/dell/gm45_latitude/variants/e6400/hda_verb.c
  213. similarity index 100%
  214. rename from src/mainboard/dell/e6400/hda_verb.c
  215. rename to src/mainboard/dell/gm45_latitude/variants/e6400/hda_verb.c
  216. diff --git a/src/mainboard/dell/gm45_latitude/variants/e6400/overridetree.cb b/src/mainboard/dell/gm45_latitude/variants/e6400/overridetree.cb
  217. new file mode 100644
  218. index 0000000000..acc34a2252
  219. --- /dev/null
  220. +++ b/src/mainboard/dell/gm45_latitude/variants/e6400/overridetree.cb
  221. @@ -0,0 +1,7 @@
  222. +## SPDX-License-Identifier: GPL-2.0-or-later
  223. +
  224. +chip northbridge/intel/gm45
  225. + device domain 0 on
  226. + subsystemid 0x1028 0x0233 inherit
  227. + end
  228. +end
  229. --
  230. 2.39.5