Index: src/drivers/ti/Kconfig
===================================================================
--- src/drivers/ti/Kconfig	(revision 0)
+++ src/drivers/ti/Kconfig	(revision 0)
@@ -0,0 +1,22 @@
+menu "Texas Instruments PCMCIA/CardBus controller support"
+	depends on DRIVERS_TI
+	
+config PCI1225
+	bool "Texas Instruments PCI1225 PCMCIA/CardBus controller"
+	default n
+	help
+		Enables the PCI1225 PCMCIA/CardBus controller
+
+config PCI1420
+	bool "Texas Instruments PCI1420 PCMCIA/CardBus controller"
+	default n
+	help
+		Enables the PCI1420 PCMCIA/CardBus controller 
+
+config PCI1520
+	bool "Texas Instruments PCI1520 PCMCIA/CardBus controller"
+	default n
+	help
+		Enables the PCI1520 PCMCIA/CardBus controller 
+		
+endmenu

Index: src/drivers/ti/pcmcia-cardbus/pci1420.c
===================================================================
--- src/drivers/ti/pcmcia-cardbus/pci1420.c	(revision 0)
+++ src/drivers/ti/pcmcia-cardbus/pci1420.c	(revision 0)
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2010 Marc Bertens <mbertens@xs4all.nl>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ */
+ #include "ti-pcmcia-cardbus.h"
+/**
+ *	This is the specific implenetation for the PCI1420 PCMCIA/CardBus controler
+ *	the ti_pci1x2y_init() function located in 'ti-pcmcia-cardbus.c'
+ */
+
+static struct device_operations ti_pci1420_ops  = {
+	.read_resources   = NULL, // pci_dev_read_resources,
+	.set_resources    = pci_dev_set_resources,
+	.enable_resources = pci_dev_enable_resources,
+	.init             = ti_pci1x2y_init,
+	.scan_bus         = 0,
+};
+
+static const struct pci_driver ti_pci1420_driver __pci_driver = {
+        .ops    = &ti_pci1420_ops,
+        .vendor = PCI_VENDOR_ID_TI,
+        .device = PCI_DEVICE_ID_TI_1420,
+};
+
Index: src/drivers/ti/pcmcia-cardbus/pci1520.c
===================================================================
--- src/drivers/ti/pcmcia-cardbus/pci1520.c	(revision 0)
+++ src/drivers/ti/pcmcia-cardbus/pci1520.c	(revision 0)
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2010 Marc Bertens <mbertens@xs4all.nl>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ */
+#include "ti-pcmcia-cardbus.h"
+/**
+ *	This is the specific implenetation for the PCI1420 PCMCIA/CardBus controler
+ *	the ti_pci1x2y_init() function located in 'ti-pcmcia-cardbus.c'
+ */
+
+static struct device_operations ti_pci1520_ops  = {
+	.read_resources   = NULL, // pci_dev_read_resources,
+	.set_resources    = pci_dev_set_resources,
+	.enable_resources = pci_dev_enable_resources,
+	.init             = ti_pci1x2y_init,
+	.scan_bus         = 0,
+};
+
+static const struct pci_driver ti_pci1520_driver __pci_driver = {
+        .ops    = &ti_pci1520_ops,
+        .vendor = PCI_VENDOR_ID_TI,
+        .device = PCI_DEVICE_ID_TI_1420,
+};
+
Index: src/drivers/ti/pcmcia-cardbus/Makefile.inc
===================================================================
--- src/drivers/ti/pcmcia-cardbus/Makefile.inc	(revision 0)
+++ src/drivers/ti/pcmcia-cardbus/Makefile.inc	(revision 0)
@@ -0,0 +1,8 @@
+##
+##	Each chip needs the generic file and a specific file
+##
+driver-$(CONFIG_DRIVERS_TI) += ti-pcmcia-cardbus.o
+driver-$(CONFIG_PCI1225) += pci1225.o
+driver-$(CONFIG_PCI1420) += pci1420.o
+driver-$(CONFIG_PCI1520) += pci1520.o
+
Index: src/drivers/ti/pcmcia-cardbus/pci1225.c
===================================================================
--- src/drivers/ti/pcmcia-cardbus/pci1225.c	(revision 0)
+++ src/drivers/ti/pcmcia-cardbus/pci1225.c	(revision 0)
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2010 Marc Bertens <mbertens@xs4all.nl>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ */
+#include "ti-pcmcia-cardbus.h"
+/**
+ *	This is the specific implenetation for the PCI1225 PCMCIA/CardBus controler
+ *	the ti_pci1x2y_init() function located in 'ti-pcmcia-cardbus.c'
+ */
+
+static struct device_operations ti_pci1225_ops  = {
+	.read_resources   = NULL, //pci_dev_read_resources,
+	.set_resources    = pci_dev_set_resources,
+	.enable_resources = pci_dev_enable_resources,
+	.init             = ti_pci1x2y_init,
+	.scan_bus         = 0,
+};
+
+static const struct pci_driver ti_pci1225_driver __pci_driver = {
+        .ops    = &ti_pci1225_ops,
+        .vendor = PCI_VENDOR_ID_TI,
+        .device = PCI_DEVICE_ID_TI_1225,
+};
+
Index: src/drivers/ti/pcmcia-cardbus/ti-pcmcia-cardbus.c
===================================================================
--- src/drivers/ti/pcmcia-cardbus/ti-pcmcia-cardbus.c	(revision 0)
+++ src/drivers/ti/pcmcia-cardbus/ti-pcmcia-cardbus.c	(revision 0)
@@ -0,0 +1,59 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2010 Marc Bertens <mbertens@xs4all.nl>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ */
+#include "ti-pcmcia-cardbus.h"
+/**
+ *	This is the general PCMCIA/CardBus controller setup
+ *	the following devices are supported by this PCI1225, PCI1420 and
+ *	the PCI1520.
+ *	The implementation is taken from the PCI1520 implementation Guide
+ *	For each chip there is a specific file to handle the identification.
+ */
+
+#define CONFIG_TI_PCMCIA_CARDBUS_CMDR	0x0107
+#define CONFIG_TI_PCMCIA_CARDBUS_CLSR	0x00
+#define CONFIG_TI_PCMCIA_CARDBUS_CLTR	0x40
+#define CONFIG_TI_PCMCIA_CARDBUS_BCR	0x07C0
+#define CONFIG_TI_PCMCIA_CARDBUS_SCR	0x08449060
+#define CONFIG_TI_PCMCIA_CARDBUS_MRR	0x00007522
+
+void ti_pci1x2y_init(struct device *dev)
+{
+	printk(BIOS_INFO, "Init of Texas Instruments PCI1x2x PCMCIA/CardBus controller\n");
+	// Command register (offset 04)
+	pci_write_config16( dev, 0x04, CONFIG_TI_PCMCIA_CARDBUS_CMDR );
+	// Cache Line Size Register (offset 0x0C) will be set to zero, i assume no cache
+	pci_write_config8( dev, 0x0C, CONFIG_TI_PCMCIA_CARDBUS_CLSR );
+	// CardBus latency timer register (offset 1B)
+	pci_write_config8( dev, 0x1B, CONFIG_TI_PCMCIA_CARDBUS_CLTR );
+	// Bridge control register (offset 3E)
+	pci_write_config16( dev, 0x3E, CONFIG_TI_PCMCIA_CARDBUS_BCR );
+	/** Enable change sub-vendor id
+	 * Clear the bit 5 to enable to write to the sub-vendor/device ids at 40 and 42 */
+	pci_write_config32( dev, 0x80, 0x10 );
+	pci_write_config32( dev, 0x40, PCI_VENDOR_ID_NOKIA );
+	// Now write the correct value for SCR
+	// System Control Register (offset 0x80) will be set to the value 0x00224010.
+	pci_write_config32( dev, 0x80, CONFIG_TI_PCMCIA_CARDBUS_SCR );
+	// Multifunction routing register
+	pci_write_config32( dev, 0x8C, CONFIG_TI_PCMCIA_CARDBUS_MRR );
+	// Set Device Control Register (0x92) accordingly
+	pci_write_config8( dev, 0x92, pci_read_config8( dev, 0x92 ) | 0x02 );
+	return;
+}
Index: src/drivers/ti/pcmcia-cardbus/ti-pcmcia-cardbus.h
===================================================================
--- src/drivers/ti/pcmcia-cardbus/ti-pcmcia-cardbus.h	(revision 0)
+++ src/drivers/ti/pcmcia-cardbus/ti-pcmcia-cardbus.h	(revision 0)
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2010 Marc Bertens <mbertens@xs4all.nl>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ */
+#ifndef __TI_PCMCIA_CARDBUS_H__
+#define __TI_PCMCIA_CARDBUS_H__
+
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <device/pci_ops.h>
+#include <console/console.h>
+
+void ti_pci1x2y_init(struct device *dev);
+
+#endif

