diff options
Diffstat (limited to 'recipes-kernel/linux/files/0007-Quark-Platform-Code-quark.patch')
-rw-r--r-- | recipes-kernel/linux/files/0007-Quark-Platform-Code-quark.patch | 1005 |
1 files changed, 656 insertions, 349 deletions
diff --git a/recipes-kernel/linux/files/0007-Quark-Platform-Code-quark.patch b/recipes-kernel/linux/files/0007-Quark-Platform-Code-quark.patch index 21f2d7f..d8797fc 100644 --- a/recipes-kernel/linux/files/0007-Quark-Platform-Code-quark.patch +++ b/recipes-kernel/linux/files/0007-Quark-Platform-Code-quark.patch @@ -1,34 +1,35 @@ From xxxx Mon Sep 17 00:00:00 2001 From: Quark Team <noreply@intel.com> -Date: Wed, 26 Feb 2014 14:40:08 +0000 +Date: Thu, 10 Apr 2014 11:58:52 +0100 Subject: [PATCH 07/21] Quark Platform Code --- drivers/platform/x86/Kconfig | 4 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/quark/Kconfig | 41 + - drivers/platform/x86/quark/Makefile | 14 + - drivers/platform/x86/quark/intel_qrk_audio_ctrl.c | 514 +++++++++ - drivers/platform/x86/quark/intel_qrk_audio_ctrl.h | 45 + - drivers/platform/x86/quark/intel_qrk_board_data.c | 260 +++++ - drivers/platform/x86/quark/intel_qrk_esram.c | 1144 ++++++++++++++++++++ - drivers/platform/x86/quark/intel_qrk_esram.h | 107 ++ - drivers/platform/x86/quark/intel_qrk_esram_test.c | 602 ++++++++++ - drivers/platform/x86/quark/intel_qrk_esram_test.h | 43 + - drivers/platform/x86/quark/intel_qrk_imr.c | 697 ++++++++++++ - drivers/platform/x86/quark/intel_qrk_imr.h | 157 +++ - drivers/platform/x86/quark/intel_qrk_imr_kernel.c | 139 +++ - drivers/platform/x86/quark/intel_qrk_imr_test.c | 357 ++++++ - .../x86/quark/intel_qrk_plat_clanton_hill.c | 226 ++++ - .../x86/quark/intel_qrk_plat_clanton_peak.c | 227 ++++ - .../platform/x86/quark/intel_qrk_plat_cross_hill.c | 392 +++++++ - .../platform/x86/quark/intel_qrk_plat_galileo.c | 398 +++++++ - .../platform/x86/quark/intel_qrk_plat_kips_bay.c | 176 +++ - drivers/platform/x86/quark/intel_qrk_sb.c | 253 +++++ - drivers/platform/x86/quark/intel_qrk_thermal.c | 360 ++++++ - include/linux/intel_qrk_sb.h | 92 ++ - include/linux/platform_data/quark.h | 44 + - 24 files changed, 6293 insertions(+), 0 deletions(-) + drivers/platform/x86/quark/Makefile | 15 + + drivers/platform/x86/quark/intel_qrk_audio_ctrl.c | 507 +++++++++ + drivers/platform/x86/quark/intel_qrk_audio_ctrl.h | 38 + + drivers/platform/x86/quark/intel_qrk_board_data.c | 257 +++++ + drivers/platform/x86/quark/intel_qrk_esram.c | 1137 ++++++++++++++++++++ + drivers/platform/x86/quark/intel_qrk_esram.h | 100 ++ + drivers/platform/x86/quark/intel_qrk_esram_test.c | 595 ++++++++++ + drivers/platform/x86/quark/intel_qrk_esram_test.h | 36 + + drivers/platform/x86/quark/intel_qrk_imr.c | 690 ++++++++++++ + drivers/platform/x86/quark/intel_qrk_imr.h | 150 +++ + drivers/platform/x86/quark/intel_qrk_imr_kernel.c | 132 +++ + drivers/platform/x86/quark/intel_qrk_imr_test.c | 350 ++++++ + .../x86/quark/intel_qrk_plat_clanton_hill.c | 219 ++++ + .../x86/quark/intel_qrk_plat_clanton_peak.c | 220 ++++ + .../platform/x86/quark/intel_qrk_plat_cross_hill.c | 430 ++++++++ + .../platform/x86/quark/intel_qrk_plat_galileo.c | 391 +++++++ + .../x86/quark/intel_qrk_plat_galileo_gen2.c | 392 +++++++ + .../platform/x86/quark/intel_qrk_plat_kips_bay.c | 169 +++ + drivers/platform/x86/quark/intel_qrk_sb.c | 246 +++++ + drivers/platform/x86/quark/intel_qrk_thermal.c | 353 ++++++ + include/linux/intel_qrk_sb.h | 85 ++ + include/linux/platform_data/quark.h | 37 + + 25 files changed, 6595 insertions(+) create mode 100644 drivers/platform/x86/quark/Kconfig create mode 100644 drivers/platform/x86/quark/Makefile create mode 100644 drivers/platform/x86/quark/intel_qrk_audio_ctrl.c @@ -46,6 +47,7 @@ Subject: [PATCH 07/21] Quark Platform Code create mode 100644 drivers/platform/x86/quark/intel_qrk_plat_clanton_peak.c create mode 100644 drivers/platform/x86/quark/intel_qrk_plat_cross_hill.c create mode 100644 drivers/platform/x86/quark/intel_qrk_plat_galileo.c + create mode 100644 drivers/platform/x86/quark/intel_qrk_plat_galileo_gen2.c create mode 100644 drivers/platform/x86/quark/intel_qrk_plat_kips_bay.c create mode 100644 drivers/platform/x86/quark/intel_qrk_sb.c create mode 100644 drivers/platform/x86/quark/intel_qrk_thermal.c @@ -125,16 +127,17 @@ index 0000000..0e2c722 + diff --git a/drivers/platform/x86/quark/Makefile b/drivers/platform/x86/quark/Makefile new file mode 100644 -index 0000000..0a03469 +index 0000000..8c917a5 --- /dev/null +++ b/drivers/platform/x86/quark/Makefile -@@ -0,0 +1,14 @@ +@@ -0,0 +1,15 @@ +obj-$(CONFIG_INTEL_QUARK_X1000_SOC) += intel_qrk_board_data.o +obj-$(CONFIG_INTEL_QUARK_X1000_SOC) += intel_qrk_plat_clanton_hill.o +obj-$(CONFIG_INTEL_QUARK_X1000_SOC) += intel_qrk_plat_clanton_peak.o +obj-$(CONFIG_INTEL_QUARK_X1000_SOC) += intel_qrk_plat_cross_hill.o +obj-$(CONFIG_INTEL_QUARK_X1000_SOC) += intel_qrk_plat_kips_bay.o +obj-$(CONFIG_INTEL_QUARK_X1000_SOC) += intel_qrk_plat_galileo.o ++obj-$(CONFIG_INTEL_QUARK_X1000_SOC) += intel_qrk_plat_galileo_gen2.o +obj-$(CONFIG_INTEL_QUARK_X1000_SOC) += intel_qrk_sb.o +obj-$(CONFIG_INTEL_QUARK_X1000_SOC) += intel_qrk_imr.o +obj-$(CONFIG_INTEL_QUARK_X1000_SOC) += intel_qrk_imr_kernel.o @@ -145,30 +148,23 @@ index 0000000..0a03469 +obj-$(CONFIG_INTEL_QRK_AUDIO_CTRL) += intel_qrk_audio_ctrl.o diff --git a/drivers/platform/x86/quark/intel_qrk_audio_ctrl.c b/drivers/platform/x86/quark/intel_qrk_audio_ctrl.c new file mode 100644 -index 0000000..ffc3791 +index 0000000..8d03f76 --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_audio_ctrl.c -@@ -0,0 +1,514 @@ +@@ -0,0 +1,507 @@ +/* + * Intel Quark platform audio control driver + * + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + * + * The Intel Clanton Hill platform hardware design includes an audio subsystem + * with a number of interconnected audio interfaces. This driver enables @@ -665,30 +661,23 @@ index 0000000..ffc3791 +MODULE_LICENSE("Dual BSD/GPL"); diff --git a/drivers/platform/x86/quark/intel_qrk_audio_ctrl.h b/drivers/platform/x86/quark/intel_qrk_audio_ctrl.h new file mode 100644 -index 0000000..581d0e2 +index 0000000..d4f05ad --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_audio_ctrl.h -@@ -0,0 +1,45 @@ +@@ -0,0 +1,38 @@ +/* + * Intel Quark platform audio control driver + * + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + * + * See intel_qrk_audio_ctrl.c for a detailed description + * @@ -716,28 +705,21 @@ index 0000000..581d0e2 +#endif /* __INTEL_QRK_AUDIO_CTRL_H__ */ diff --git a/drivers/platform/x86/quark/intel_qrk_board_data.c b/drivers/platform/x86/quark/intel_qrk_board_data.c new file mode 100644 -index 0000000..db7f76a +index 0000000..c9d4f99 --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_board_data.c -@@ -0,0 +1,260 @@ +@@ -0,0 +1,257 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark Legacy Platform Data accessor layer @@ -849,6 +831,10 @@ index 0000000..db7f76a + .name = "Galileo", + .id = -1, + }, ++ { ++ .name = "GalileoGen2", ++ .id = -1, ++ }, + +}; + @@ -982,28 +968,21 @@ index 0000000..db7f76a + diff --git a/drivers/platform/x86/quark/intel_qrk_esram.c b/drivers/platform/x86/quark/intel_qrk_esram.c new file mode 100644 -index 0000000..55adb41 +index 0000000..62ae521 --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_esram.c -@@ -0,0 +1,1144 @@ +@@ -0,0 +1,1137 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark eSRAM overlay driver @@ -2132,28 +2111,21 @@ index 0000000..55adb41 + diff --git a/drivers/platform/x86/quark/intel_qrk_esram.h b/drivers/platform/x86/quark/intel_qrk_esram.h new file mode 100644 -index 0000000..71aaba1 +index 0000000..a4c9636 --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_esram.h -@@ -0,0 +1,107 @@ +@@ -0,0 +1,100 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark eSRAM overlay driver @@ -2245,28 +2217,21 @@ index 0000000..71aaba1 +#endif /* __INTEL_QRK_ESRAM_H__ */ diff --git a/drivers/platform/x86/quark/intel_qrk_esram_test.c b/drivers/platform/x86/quark/intel_qrk_esram_test.c new file mode 100644 -index 0000000..544ad57 +index 0000000..c337dc5 --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_esram_test.c -@@ -0,0 +1,602 @@ +@@ -0,0 +1,595 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/** + * intel_qrk_esram_test.c @@ -2853,28 +2818,21 @@ index 0000000..544ad57 +module_exit(intel_qrk_esram_test_exit); diff --git a/drivers/platform/x86/quark/intel_qrk_esram_test.h b/drivers/platform/x86/quark/intel_qrk_esram_test.h new file mode 100644 -index 0000000..35ad2d8 +index 0000000..5adf7ca --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_esram_test.h -@@ -0,0 +1,43 @@ +@@ -0,0 +1,36 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/** + * intel_qrk_esram_test.h @@ -2902,28 +2860,21 @@ index 0000000..35ad2d8 + diff --git a/drivers/platform/x86/quark/intel_qrk_imr.c b/drivers/platform/x86/quark/intel_qrk_imr.c new file mode 100644 -index 0000000..8865307 +index 0000000..fcae59a --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_imr.c -@@ -0,0 +1,697 @@ +@@ -0,0 +1,690 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark IMR driver @@ -3605,28 +3556,21 @@ index 0000000..8865307 + diff --git a/drivers/platform/x86/quark/intel_qrk_imr.h b/drivers/platform/x86/quark/intel_qrk_imr.h new file mode 100644 -index 0000000..9f16c61 +index 0000000..a6f4730 --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_imr.h -@@ -0,0 +1,157 @@ +@@ -0,0 +1,150 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark IMR driver @@ -3768,28 +3712,21 @@ index 0000000..9f16c61 +#endif diff --git a/drivers/platform/x86/quark/intel_qrk_imr_kernel.c b/drivers/platform/x86/quark/intel_qrk_imr_kernel.c new file mode 100644 -index 0000000..fdfaea3 +index 0000000..1cf922d --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_imr_kernel.c -@@ -0,0 +1,139 @@ +@@ -0,0 +1,132 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark IMR driver @@ -3913,28 +3850,21 @@ index 0000000..fdfaea3 +module_exit(intel_qrk_imr_runt_exit); diff --git a/drivers/platform/x86/quark/intel_qrk_imr_test.c b/drivers/platform/x86/quark/intel_qrk_imr_test.c new file mode 100644 -index 0000000..4f2096a +index 0000000..549bb61 --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_imr_test.c -@@ -0,0 +1,357 @@ +@@ -0,0 +1,350 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark IMR Test module @@ -4276,28 +4206,21 @@ index 0000000..4f2096a + diff --git a/drivers/platform/x86/quark/intel_qrk_plat_clanton_hill.c b/drivers/platform/x86/quark/intel_qrk_plat_clanton_hill.c new file mode 100644 -index 0000000..3c489e8 +index 0000000..baa277c --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_plat_clanton_hill.c -@@ -0,0 +1,226 @@ +@@ -0,0 +1,219 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark Legacy Platform Data Layout.conf accessor @@ -4508,28 +4431,21 @@ index 0000000..3c489e8 + diff --git a/drivers/platform/x86/quark/intel_qrk_plat_clanton_peak.c b/drivers/platform/x86/quark/intel_qrk_plat_clanton_peak.c new file mode 100644 -index 0000000..9edcef7 +index 0000000..b0a8255 --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_plat_clanton_peak.c -@@ -0,0 +1,227 @@ +@@ -0,0 +1,220 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Clanton Peak board entry point @@ -4741,28 +4657,21 @@ index 0000000..9edcef7 +MODULE_ALIAS("platform:"DRIVER_NAME); diff --git a/drivers/platform/x86/quark/intel_qrk_plat_cross_hill.c b/drivers/platform/x86/quark/intel_qrk_plat_cross_hill.c new file mode 100644 -index 0000000..eb1960a +index 0000000..74cb09f --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_plat_cross_hill.c -@@ -0,0 +1,392 @@ +@@ -0,0 +1,430 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * CrossHill board entry point @@ -4791,10 +4700,28 @@ index 0000000..eb1960a +#define SPI_BPEAK_ID2_GPIO 15 +#define SPI_BPEAK_ID3_GPIO 14 + ++/* ++ * GPIO number for eADC interrupt (MAX78M6610+LMU) ++ */ ++#define GPIO_78M6610_INT 2 ++ +static int nc_gpio_reg; +static int sc_gpio_reg; + +static int cross_hill_probe; ++/* ++ * GPIOs used as interrupts by MAX78M6610+LMU eADC ++ * ++ * Extend this array adding new elements at the end. ++ */ ++static struct gpio crh_eadc_int_gpios[] = { ++ { ++ GPIO_78M6610_INT, ++ GPIOF_IN, ++ "max78m6610-int" ++ }, ++}; ++ + +/* + * Blackburn Peak SPI daughterboard ID values @@ -4872,6 +4799,7 @@ index 0000000..eb1960a + +}; + ++/* For compatibility reason, new SPI energy modules must be added at the end */ +static struct spi_board_info spi_energy_adc_devs[] = { + { + .modalias = "max78m6610_lmu", @@ -4881,6 +4809,7 @@ index 0000000..eb1960a + .bus_num = 1, + .chip_select = 0, + .controller_data = &qrk_ffrd_spi_1_cs_0, ++ .irq = -1, + }, +}; + @@ -5004,8 +4933,33 @@ index 0000000..eb1960a + + case QRK_SPI_BPEAK_ID_ADC_MAXIM: + { -+ return spi_register_board_info(spi_energy_adc_devs, ++ ret = gpio_request_array(crh_eadc_int_gpios, ++ ARRAY_SIZE(crh_eadc_int_gpios)); ++ if (ret) { ++ pr_err("%s: Failed to allocate eADC interrupt GPIO pins!\n", ++ __func__); ++ return ret; ++ } ++ ret = gpio_to_irq(GPIO_78M6610_INT); ++ if (ret < 0) { ++ pr_err("%s: Failed to request IRQ for GPIO %u!\n", ++ __func__, GPIO_78M6610_INT); ++ goto error_gpio_free; ++ } ++ spi_energy_adc_devs[0].irq = ret; ++ ret = spi_register_board_info(spi_energy_adc_devs, + ARRAY_SIZE(spi_energy_adc_devs)); ++ if (ret) { ++ pr_err("%s: Failed to register eADC module!\n", ++ __func__); ++ goto error_gpio_free; ++ } ++ return 0; ++error_gpio_free: ++ gpio_free_array(crh_eadc_int_gpios, ++ ARRAY_SIZE(crh_eadc_int_gpios)); ++ spi_energy_adc_devs[0].irq = -1; ++ return ret; + } + case QRK_SPI_BPEAK_ID_ZB_EXEGIN_ATMEL: + { @@ -5139,28 +5093,21 @@ index 0000000..eb1960a + diff --git a/drivers/platform/x86/quark/intel_qrk_plat_galileo.c b/drivers/platform/x86/quark/intel_qrk_plat_galileo.c new file mode 100644 -index 0000000..0df0ac0 +index 0000000..a45f6a0 --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_plat_galileo.c -@@ -0,0 +1,398 @@ +@@ -0,0 +1,391 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark Legacy Platform Data Layout.conf accessor @@ -5541,30 +5488,421 @@ index 0000000..0df0ac0 +MODULE_LICENSE("Dual BSD/GPL"); +MODULE_ALIAS("platform:"DRIVER_NAME); + -diff --git a/drivers/platform/x86/quark/intel_qrk_plat_kips_bay.c b/drivers/platform/x86/quark/intel_qrk_plat_kips_bay.c +diff --git a/drivers/platform/x86/quark/intel_qrk_plat_galileo_gen2.c b/drivers/platform/x86/quark/intel_qrk_plat_galileo_gen2.c new file mode 100644 -index 0000000..5e94b4b +index 0000000..7c09add --- /dev/null -+++ b/drivers/platform/x86/quark/intel_qrk_plat_kips_bay.c -@@ -0,0 +1,176 @@ ++++ b/drivers/platform/x86/quark/intel_qrk_plat_galileo_gen2.c +@@ -0,0 +1,392 @@ +/* ++ * Intel Quark Legacy Platform Data Layout.conf accessor ++ * ++ * Simple Legacy SPI flash access layer ++ * + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. ++ * Author : Bryan O'Donoghue <bryan.odonoghue@linux.intel.com> 2013 ++ */ ++ ++#include <linux/errno.h> ++#include <linux/gpio.h> ++#include <linux/i2c.h> ++#include <linux/i2c/at24.h> ++#include <linux/io.h> ++#include <linux/ioport.h> ++#include <linux/module.h> ++#include <linux/mfd/intel_qrk_gip_pdata.h> ++#include <linux/mtd/partitions.h> ++#include <linux/mtd/physmap.h> ++#include <linux/platform_device.h> ++#include <linux/printk.h> ++#include <linux/spi/pxa2xx_spi.h> ++#include <linux/spi/spi.h> ++#include <linux/spi/flash.h> ++#include <linux/i2c/pca953x.h> ++ ++#define DRIVER_NAME "GalileoGen2" ++#define GPIO_RESTRICT_NAME "qrk-gpio-restrict-sc" ++#define LPC_SCH_SPINAME "spi-lpc-sch" ++ ++#define GPIO_PCAL9555A_EXP2_INT 9 ++ ++/* Option to allow GPIO 10 to be used for SPI1 chip-select */ ++static int gpio_cs; ++ ++module_param(gpio_cs, int, S_IRUGO | S_IWUSR); ++MODULE_PARM_DESC(gpio_cs, "Enable GPIO chip-select for SPI channel 1"); ++ ++/* Galileo Gen2 boards require i2c master to operate @400kHz 'fast mode' */ ++static struct intel_qrk_gip_pdata gip_pdata = { ++ .i2c_std_mode = 0, ++}; ++static struct intel_qrk_gip_pdata *galileo_gen2_gip_get_pdata(void) ++{ ++ return &gip_pdata; ++} ++ ++/****************************************************************************** ++ * Texas Instruments ADC1x8S102 SPI Device Platform Data ++ ******************************************************************************/ ++#include "linux/platform_data/adc1x8s102.h" ++ ++/* Maximum input voltage allowed for each ADC input, in milliVolts */ ++#define ADC1x8S102_MAX_EXT_VIN 5000 ++ ++static const struct adc1x8s102_platform_data adc1x8s102_platform_data = { ++ .ext_vin = ADC1x8S102_MAX_EXT_VIN ++}; ++ ++#include "linux/i2c/pca953x.h" ++#define PCAL9555A_GPIO_BASE_OFFSET 16 ++ ++static struct pca953x_platform_data pcal9555a_platform_data_exp0 = { ++ .gpio_base = PCAL9555A_GPIO_BASE_OFFSET, ++ .irq_base = -1, ++}; ++ ++static struct pca953x_platform_data pcal9555a_platform_data_exp1 = { ++ .gpio_base = PCAL9555A_GPIO_BASE_OFFSET + 16, ++ .irq_base = -1, ++}; ++ ++static struct pca953x_platform_data pcal9555a_platform_data_exp2 = { ++ .gpio_base = PCAL9555A_GPIO_BASE_OFFSET + 32, ++}; ++ ++#include "linux/platform_data/pca9685.h" ++ ++static struct pca9685_pdata pca9685_platform_data = { ++ .chan_mapping = { ++ PWM_CH_GPIO, PWM_CH_PWM, ++ PWM_CH_GPIO, PWM_CH_PWM, ++ PWM_CH_GPIO, PWM_CH_PWM, ++ PWM_CH_GPIO, PWM_CH_PWM, ++ PWM_CH_GPIO, PWM_CH_PWM, ++ PWM_CH_GPIO, PWM_CH_PWM, ++ PWM_CH_GPIO, PWM_CH_GPIO, ++ PWM_CH_GPIO, PWM_CH_GPIO, ++ PWM_CH_DISABLED /* ALL_LED disabled */ ++ }, ++ .gpio_base = PCAL9555A_GPIO_BASE_OFFSET + 48, ++}; ++ ++/****************************************************************************** ++ * Intel Galileo Gen2 i2c clients ++ ******************************************************************************/ ++#define EEPROM_ADDR 0x54 ++#define PCAL9555A_EXP0_ADDR 0x25 ++#define PCAL9555A_EXP1_ADDR 0x26 ++#define PCAL9555A_EXP2_ADDR 0x27 ++#define PCA9685_ADDR 0x47 ++ ++static struct i2c_board_info probed_i2c_eeprom; ++static struct i2c_board_info probed_i2c_pcal9555a_exp0 = { ++ .platform_data = &pcal9555a_platform_data_exp0, ++}; ++static struct i2c_board_info probed_i2c_pcal9555a_exp1 = { ++ .platform_data = &pcal9555a_platform_data_exp1, ++}; ++static struct i2c_board_info probed_i2c_pcal9555a_exp2 = { ++ .platform_data = &pcal9555a_platform_data_exp2, ++}; ++static struct i2c_board_info probed_i2c_pca9685 = { ++ .platform_data = &pca9685_platform_data, ++}; ++ ++static const unsigned short eeprom_i2c_addr[] = { ++ EEPROM_ADDR, I2C_CLIENT_END ++}; ++static const unsigned short pcal9555a_exp0_i2c_addr[] = { ++ PCAL9555A_EXP0_ADDR, I2C_CLIENT_END ++}; ++static const unsigned short pcal9555a_exp1_i2c_addr[] = { ++ PCAL9555A_EXP1_ADDR, I2C_CLIENT_END ++}; ++static const unsigned short pcal9555a_exp2_i2c_addr[] = { ++ PCAL9555A_EXP2_ADDR, I2C_CLIENT_END ++}; ++static const unsigned short pca9685_i2c_addr[] = { ++ PCA9685_ADDR, I2C_CLIENT_END ++}; ++ ++static int i2c_probe(struct i2c_adapter *adap, unsigned short addr) ++{ ++ /* Always return success: the I2C clients are already known. */ ++ return 1; ++} ++ ++/****************************************************************************** ++ * Intel Quark SPI Controller Data ++ ******************************************************************************/ ++static struct pxa2xx_spi_chip qrk_ffrd_spi_0_cs_0 = { ++ .gpio_cs = 8, ++}; ++ ++static struct pxa2xx_spi_chip qrk_ffrd_spi_1_cs_0 = { ++ .gpio_cs = 10, ++}; ++ ++#define LPC_SCH_SPI_BUS_ID 0x03 ++ ++/* TODO: extract this data from layout.conf encoded in flash */ ++struct mtd_partition galileo_gen2_ilb_partitions[] = { ++ { ++ .name = "grub", ++ .size = 4096, ++ .offset = 0, ++ }, ++ { ++ .name = "grub.conf", ++ .size = 0xA00, ++ .offset = 0x50500, ++ }, ++ { ++ .name = "layout.conf", ++ .size = 4096, ++ .offset = 0x708000, ++ }, ++ { ++ .name = "sketch", ++ .size = 0x40000, ++ .offset = 0x750000, ++ }, ++ { ++ .name = "raw", ++ .size = 8192000, ++ .offset = 0, ++ ++ }, ++}; ++ ++static struct flash_platform_data ilb_flash = { ++ .type = "s25fl064k", ++ .parts = galileo_gen2_ilb_partitions, ++ .nr_parts = ARRAY_SIZE(galileo_gen2_ilb_partitions), ++}; ++ ++static struct spi_board_info spi0_onboard_devs[] = { ++ { ++ .modalias = "m25p80", ++ .platform_data = &ilb_flash, ++ .bus_num = LPC_SCH_SPI_BUS_ID, ++ .chip_select = 0, ++ }, ++ { ++ .modalias = "adc1x8s102", ++ .max_speed_hz = 16667000, ++ .platform_data = &adc1x8s102_platform_data, ++ .mode = SPI_MODE_3, ++ .bus_num = 0, ++ .chip_select = 0, ++ .controller_data = &qrk_ffrd_spi_0_cs_0, ++ }, ++}; ++ ++static struct spi_board_info spi1_onboard_devs_gpiocs[] = { ++ { ++ .modalias = "spidev", ++ .chip_select = 0, ++ .controller_data = NULL, ++ .max_speed_hz = 50000000, ++ .bus_num = 1, ++ .controller_data = &qrk_ffrd_spi_1_cs_0, ++ }, ++}; ++ ++static struct spi_board_info spi1_onboard_devs[] = { ++ { ++ .modalias = "spidev", ++ .chip_select = 0, ++ .controller_data = NULL, ++ .max_speed_hz = 50000000, ++ .bus_num = 1, ++ }, ++}; ++ ++ ++/** ++ * intel_qrk_spi_add_onboard_devs ++ * ++ * @return 0 on success or standard errnos on failure ++ * ++ * Registers onboard SPI device(s) present on the Izmir platform ++ */ ++static int intel_qrk_spi_add_onboard_devs(void) ++{ ++ int ret = 0; ++ ++ ret = spi_register_board_info(spi0_onboard_devs, ++ ARRAY_SIZE(spi0_onboard_devs)); ++ if (ret) ++ return ret; ++ ++ if (gpio_cs) ++ return spi_register_board_info(spi1_onboard_devs_gpiocs, ++ ARRAY_SIZE(spi1_onboard_devs_gpiocs)); ++ else ++ return spi_register_board_info(spi1_onboard_devs, ++ ARRAY_SIZE(spi1_onboard_devs)); ++} ++ ++ ++static struct gpio reserved_gpios[] = { ++ { ++ GPIO_PCAL9555A_EXP2_INT, ++ GPIOF_IN, ++ "pcal9555a-exp2-int", ++ }, ++}; ++ ++/** ++ * intel_qrk_gpio_restrict_probe ++ * ++ * Make GPIOs pertaining to Firmware inaccessible by requesting them. The ++ * GPIOs are never released nor accessed by this driver. ++ * ++ * Registers devices which are dependent on this GPIO driver ++ */ ++static int intel_qrk_gpio_restrict_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ struct i2c_adapter *i2c_adap = NULL; ++ struct i2c_client *client = NULL; ++ ++ /* Need to tell the PCA953X driver which GPIO IRQ to use for signalling ++ * interrupts. We can't get the IRQ until the GPIO driver is loaded. ++ * Hence, we defer registration of the I2C devices until now ++ */ ++ i2c_adap = i2c_get_adapter(0); ++ if (NULL == i2c_adap) { ++ pr_info("%s: i2c adapter not ready yet. Deferring..\n", ++ __func__); ++ return -EPROBE_DEFER; ++ } ++ ++ ret = gpio_request_array(reserved_gpios, ARRAY_SIZE(reserved_gpios)); ++ if (ret) { ++ dev_err(&client->dev, "failed to request reserved gpios\n"); ++ goto end; ++ } ++ ++ strlcpy(probed_i2c_eeprom.type, "24c08", I2C_NAME_SIZE); ++ client = i2c_new_probed_device(i2c_adap, &probed_i2c_eeprom, ++ eeprom_i2c_addr, i2c_probe); ++ if (client == NULL) { ++ pr_err("%s: Failed to probe 24c08 I2C device\n", __func__); ++ ret = -ENODEV; ++ goto end; ++ } ++ ++ strlcpy(probed_i2c_pcal9555a_exp0.type, "pcal9555a", I2C_NAME_SIZE); ++ client = i2c_new_probed_device(i2c_adap, &probed_i2c_pcal9555a_exp0, ++ pcal9555a_exp0_i2c_addr, i2c_probe); ++ if (client == NULL) { ++ pr_err("%s: Failed to probe pcal9555a I2C device\n", __func__); ++ ret = -ENODEV; ++ goto end; ++ } ++ ++ strlcpy(probed_i2c_pcal9555a_exp1.type, "pcal9555a", I2C_NAME_SIZE); ++ client = i2c_new_probed_device(i2c_adap, &probed_i2c_pcal9555a_exp1, ++ pcal9555a_exp1_i2c_addr, i2c_probe); ++ if (client == NULL) { ++ pr_err("%s: Failed to probe pcal9555a I2C device\n", __func__); ++ ret = -ENODEV; ++ goto end; ++ } ++ ++ strlcpy(probed_i2c_pcal9555a_exp2.type, "pcal9555a", I2C_NAME_SIZE); ++ probed_i2c_pcal9555a_exp2.irq = gpio_to_irq(GPIO_PCAL9555A_EXP2_INT); ++ client = i2c_new_probed_device(i2c_adap, &probed_i2c_pcal9555a_exp2, ++ pcal9555a_exp2_i2c_addr, i2c_probe); ++ if (client == NULL) { ++ pr_err("%s: Failed to probe pcal9555a I2C device\n", __func__); ++ ret = -ENODEV; ++ goto end; ++ } ++ ++ strlcpy(probed_i2c_pca9685.type, "pca9685", I2C_NAME_SIZE); ++ client = i2c_new_probed_device(i2c_adap, &probed_i2c_pca9685, ++ pca9685_i2c_addr, i2c_probe); ++ if (client == NULL) { ++ pr_err("%s: Failed to probe pca9685 I2C device\n", __func__); ++ ret = -ENODEV; ++ goto end; ++ } ++ ++ ret = intel_qrk_spi_add_onboard_devs(); ++ ++end: ++ i2c_put_adapter(i2c_adap); ++ ++ return ret; ++} ++ ++static struct platform_driver gpio_restrict_pdriver = { ++ .driver = { ++ .name = GPIO_RESTRICT_NAME, ++ .owner = THIS_MODULE, ++ }, ++ .probe = intel_qrk_gpio_restrict_probe, ++}; ++ ++static int intel_qrk_plat_galileo_gen2_probe(struct platform_device *pdev) ++{ ++ /* Assign GIP driver handle for board-specific settings */ ++ intel_qrk_gip_get_pdata = galileo_gen2_gip_get_pdata; ++ ++ /* gpio */ ++ return platform_driver_register(&gpio_restrict_pdriver); ++} ++ ++static int intel_qrk_plat_galileo_gen2_remove(struct platform_device *pdev) ++{ ++ return 0; ++} ++ ++static struct platform_driver qrk_galileo_driver = { ++ .driver = { ++ .name = DRIVER_NAME, ++ .owner = THIS_MODULE, ++ }, ++ .probe = intel_qrk_plat_galileo_gen2_probe, ++ .remove = intel_qrk_plat_galileo_gen2_remove, ++}; ++ ++module_platform_driver(qrk_galileo_driver); ++ ++MODULE_AUTHOR("Bryan O'Donoghue <bryan.odonoghue@intel.com>"); ++MODULE_DESCRIPTION("Galileo Gen2 BSP Data"); ++MODULE_LICENSE("Dual BSD/GPL"); ++MODULE_ALIAS("platform:"DRIVER_NAME); +diff --git a/drivers/platform/x86/quark/intel_qrk_plat_kips_bay.c b/drivers/platform/x86/quark/intel_qrk_plat_kips_bay.c +new file mode 100644 +index 0000000..7a33d36 +--- /dev/null ++++ b/drivers/platform/x86/quark/intel_qrk_plat_kips_bay.c +@@ -0,0 +1,169 @@ ++/* ++ * Copyright(c) 2013 Intel Corporation. + * -+ * Contact Information: -+ * Intel Corporation ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark Legacy Platform Data Layout.conf accessor @@ -5725,28 +6063,21 @@ index 0000000..5e94b4b + diff --git a/drivers/platform/x86/quark/intel_qrk_sb.c b/drivers/platform/x86/quark/intel_qrk_sb.c new file mode 100644 -index 0000000..658c41f +index 0000000..17e4ddd --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_sb.c -@@ -0,0 +1,253 @@ +@@ -0,0 +1,246 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark side-band driver @@ -5984,28 +6315,21 @@ index 0000000..658c41f +subsys_initcall(intel_qrk_sb_init); diff --git a/drivers/platform/x86/quark/intel_qrk_thermal.c b/drivers/platform/x86/quark/intel_qrk_thermal.c new file mode 100644 -index 0000000..d603d8b +index 0000000..189bb5c --- /dev/null +++ b/drivers/platform/x86/quark/intel_qrk_thermal.c -@@ -0,0 +1,360 @@ +@@ -0,0 +1,353 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark Thermal driver @@ -6350,28 +6674,21 @@ index 0000000..d603d8b +MODULE_LICENSE("Dual BSD/GPL"); diff --git a/include/linux/intel_qrk_sb.h b/include/linux/intel_qrk_sb.h new file mode 100644 -index 0000000..65d9b5e +index 0000000..4290070 --- /dev/null +++ b/include/linux/intel_qrk_sb.h -@@ -0,0 +1,92 @@ +@@ -0,0 +1,85 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark side-band driver @@ -6448,28 +6765,21 @@ index 0000000..65d9b5e +#endif /* __INTEL_QRK_SB_H__ */ diff --git a/include/linux/platform_data/quark.h b/include/linux/platform_data/quark.h new file mode 100644 -index 0000000..85f5508 +index 0000000..e9b2d55d --- /dev/null +++ b/include/linux/platform_data/quark.h -@@ -0,0 +1,44 @@ +@@ -0,0 +1,37 @@ +/* + * Copyright(c) 2013 Intel Corporation. + * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms and conditions of the GNU General Public License, ++ * version 2, as published by the Free Software Foundation. + * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Contact Information: -+ * Intel Corporation ++ * This program is distributed in the hope it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. + */ +/* + * Intel Quark platform data definition @@ -6496,6 +6806,3 @@ index 0000000..85f5508 +}plat_dataid_t; + +#endif /* _PDATA_QUARK_H */ --- -1.7.4.1 - |