All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu
@ 2009-02-09 10:45 Stanislaw Gruszka
  2009-02-11 13:59 ` Sergei Shtylyov
  2009-02-11 20:03 ` Andrew Victor
  0 siblings, 2 replies; 11+ messages in thread
From: Stanislaw Gruszka @ 2009-02-09 10:45 UTC (permalink / raw)
  To: linux-ide, Andrew Victor; +Cc: linux-arm-kernel

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
---
 arch/arm/mach-at91/at91sam9263_devices.c |  104 ++++++++++++++++++++++++++++++
 1 files changed, 104 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index b753cb8..8e46abe 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -15,6 +15,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/platform_device.h>
 #include <linux/i2c-gpio.h>
+#include <linux/delay.h>
 
 #include <linux/fb.h>
 #include <video/atmel_lcdc.h>
@@ -347,6 +348,109 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
 void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
 #endif
 
+/* --------------------------------------------------------------------
+ *  Compact Flash (PCMCIA or IDE)
+ * -------------------------------------------------------------------- */
+
+#if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE) || \
+    defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE)
+
+static struct resource cf_resources[] = {
+	[0] = {
+		.start	= 0,
+		.end	= 0,
+		.flags	= IORESOURCE_MEM,
+	},
+};
+
+static struct at91_cf_data cf_data;
+
+static struct platform_device at91_cf_device = {
+	.id 	= -1,
+	.dev	= {
+		.platform_data = &cf_data,
+	},
+	.resource = cf_resources,
+	.num_resources = ARRAY_SIZE(cf_resources),
+};
+
+void __init at91_add_device_cf(struct at91_cf_data *data)
+{
+	unsigned long ebi0_csa, addr_space;
+
+	if (!data)
+		return;
+
+	/*
+	 * assign CS4 or CS5 to SMC with Compact Flash logic support,
+	 * we assume SMC timings are configured by board code,
+	 * except True IDE where timings are controlled by driver
+	 */
+	ebi0_csa = at91_sys_read(AT91_MATRIX_EBI0CSA);
+	switch (data->chipselect) {
+	case 4:
+		at91_set_A_periph(AT91_PIN_PD6, 0);  /* EBI0_NCS4/CFCS0 */
+		ebi0_csa |= AT91_MATRIX_EBI0_CS4A_SMC_CF1;
+		addr_space = AT91_CHIPSELECT_4;
+		break;
+	case 5:
+		at91_set_A_periph(AT91_PIN_PD7, 0);  /* EBI0_NCS5/CFCS1 */
+		ebi0_csa |= AT91_MATRIX_EBI0_CS5A_SMC_CF2;
+		addr_space = AT91_CHIPSELECT_5;
+		break;
+	default:
+		printk(KERN_ERR "AT91 CF: bad chip-select requested (%u)\n",
+		       data->chipselect);
+		return;
+	}
+	at91_sys_write(AT91_MATRIX_EBI0CSA, ebi0_csa);
+
+	cf_resources[0].start = addr_space;
+	cf_resources[0].end = addr_space + SZ_256M - 1;
+
+	if (data->det_pin) {
+		at91_set_gpio_input(data->det_pin, 1);
+		at91_set_deglitch(data->det_pin, 1);
+	}
+
+	if (data->irq_pin) {
+		at91_set_gpio_input(data->irq_pin, 1);
+		at91_set_deglitch(data->irq_pin, 1);
+	}
+
+	if (data->vcc_pin)
+		/* initially off */
+		at91_set_gpio_output(data->vcc_pin, 0);
+
+	/* enable EBI controlled pins */
+	at91_set_A_periph(AT91_PIN_PD5, 1);  /* NWAIT */
+	at91_set_A_periph(AT91_PIN_PD8, 0);  /* CFCE1 */
+	at91_set_A_periph(AT91_PIN_PD9, 0);  /* CFCE2 */
+	at91_set_A_periph(AT91_PIN_PD14, 0); /* CFNRW */
+
+	if (data->flags & AT91_CF_TRUE_IDE) {
+		/* check if device is present */
+		if (data->det_pin && at91_get_gpio_value(data->det_pin) != 0) {
+			printk(KERN_ERR "AT91 CF True IDE: no device detected\n");
+			return;
+		}
+		if (data->rst_pin) {
+			/* reset the card */
+			at91_set_gpio_output(data->rst_pin, 0);
+			/* wait as defined in ATA7 vol2 (rev 4a) figure 36 */
+			udelay(25);
+			at91_set_gpio_output(data->rst_pin, 1);
+		}
+		at91_cf_device.name = "at91_ide";
+	} else
+		at91_cf_device.name = "at91_cf";
+
+	cf_data = *data;
+	platform_device_register(&at91_cf_device);
+}
+#else
+void __init at91_add_device_cf(struct at91_cf_data *data) {}
+#endif
 
 /* --------------------------------------------------------------------
  *  NAND / SmartMedia
-- 
1.5.2.5


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu
  2009-02-09 10:45 [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu Stanislaw Gruszka
@ 2009-02-11 13:59 ` Sergei Shtylyov
  2009-02-11 16:46   ` Bartlomiej Zolnierkiewicz
  2009-02-12  9:05   ` Stanislaw Gruszka
  2009-02-11 20:03 ` Andrew Victor
  1 sibling, 2 replies; 11+ messages in thread
From: Sergei Shtylyov @ 2009-02-11 13:59 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-ide, Andrew Victor, linux-arm-kernel

Hello.

Stanislaw Gruszka wrote:

> Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
>   

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

> index b753cb8..8e46abe 100644
> --- a/arch/arm/mach-at91/at91sam9263_devices.c
> +++ b/arch/arm/mach-at91/at91sam9263_devices.c
>   
[...]
> +void __init at91_add_device_cf(struct at91_cf_data *data)
> +{
> +	unsigned long ebi0_csa, addr_space;
>   
[...]
> +	if (data->flags & AT91_CF_TRUE_IDE) {
> +		/* check if device is present */
> +		if (data->det_pin && at91_get_gpio_value(data->det_pin) != 0) {
> +			printk(KERN_ERR "AT91 CF True IDE: no device detected\n");
> +			return;
> +		}
> +		if (data->rst_pin) {
> +			/* reset the card */
> +			at91_set_gpio_output(data->rst_pin, 0);
> +			/* wait as defined in ATA7 vol2 (rev 4a) figure 36 */
> +			udelay(25);
> +			at91_set_gpio_output(data->rst_pin, 1);
>   

   I'm still not sure why this is needed. Do you think thta power-on 
reset is not enough?

MBR, Sergei



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu
  2009-02-11 13:59 ` Sergei Shtylyov
@ 2009-02-11 16:46   ` Bartlomiej Zolnierkiewicz
  2009-02-11 17:31     ` Sergei Shtylyov
  2009-02-12  9:05   ` Stanislaw Gruszka
  1 sibling, 1 reply; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-02-11 16:46 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Stanislaw Gruszka, linux-ide, Andrew Victor, linux-arm-kernel

On Wednesday 11 February 2009, Sergei Shtylyov wrote:
> Hello.
> 
> Stanislaw Gruszka wrote:
> 
> > Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
> >   
> 
> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

OK, does it also mean that you are fine with [PATCH 2/3 v2]?

Thanks,
Bart

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu
  2009-02-11 16:46   ` Bartlomiej Zolnierkiewicz
@ 2009-02-11 17:31     ` Sergei Shtylyov
  0 siblings, 0 replies; 11+ messages in thread
From: Sergei Shtylyov @ 2009-02-11 17:31 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Stanislaw Gruszka, linux-ide, Andrew Victor, linux-arm-kernel

Bartlomiej Zolnierkiewicz wrote:

>>Stanislaw Gruszka wrote:

>>>Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>

>>Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

> OK, does it also mean that you are fine with [PATCH 2/3 v2]?

    No. I haven't found the time to look at it yet...

> Thanks,
> Bart

MBR, Sergei

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu
  2009-02-09 10:45 [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu Stanislaw Gruszka
  2009-02-11 13:59 ` Sergei Shtylyov
@ 2009-02-11 20:03 ` Andrew Victor
  2009-02-12  9:33   ` Stanislaw Gruszka
  1 sibling, 1 reply; 11+ messages in thread
From: Andrew Victor @ 2009-02-11 20:03 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-ide, linux-arm-kernel

hi Stanislaw,

> +       if (data->flags & AT91_CF_TRUE_IDE) {
> +               /* check if device is present */
> +               if (data->det_pin && at91_get_gpio_value(data->det_pin) != 0) {
> +                       printk(KERN_ERR "AT91 CF True IDE: no device detected\n");
> +                       return;
> +               }
> +               if (data->rst_pin) {
> +                       /* reset the card */
> +                       at91_set_gpio_output(data->rst_pin, 0);
> +                       /* wait as defined in ATA7 vol2 (rev 4a) figure 36 */
> +                       udelay(25);
> +                       at91_set_gpio_output(data->rst_pin, 1);
> +               }

Shouldn't this rather be done in the at91_ide driver?
I don't want to duplicate it in all the different at91sam9XX_devices.c files.

You could also define two separate "CF type" devices - one for CS4,
another for CS5.
That would allow for two independent "CF type" interfaces to be used
at the same time (see at91sam9260_devices.c in maxim.org.za patches).


Regards,
  Andrew Victor

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu
  2009-02-11 13:59 ` Sergei Shtylyov
  2009-02-11 16:46   ` Bartlomiej Zolnierkiewicz
@ 2009-02-12  9:05   ` Stanislaw Gruszka
  2009-02-12 16:33     ` Sergei Shtylyov
  1 sibling, 1 reply; 11+ messages in thread
From: Stanislaw Gruszka @ 2009-02-12  9:05 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-ide, Andrew Victor, linux-arm-kernel

Hi.

Wednesday 11 February 2009 14:59:00 Sergei Shtylyov napisał(a):
> [...]
> > +	if (data->flags & AT91_CF_TRUE_IDE) {
> > +		/* check if device is present */
> > +		if (data->det_pin && at91_get_gpio_value(data->det_pin) != 0) {
> > +			printk(KERN_ERR "AT91 CF True IDE: no device detected\n");
> > +			return;
> > +		}
> > +		if (data->rst_pin) {
> > +			/* reset the card */
> > +			at91_set_gpio_output(data->rst_pin, 0);
> > +			/* wait as defined in ATA7 vol2 (rev 4a) figure 36 */
> > +			udelay(25);
> > +			at91_set_gpio_output(data->rst_pin, 1);
> >   
> 
>    I'm still not sure why this is needed. Do you think thta power-on 
> reset is not enough?

HW reset is not needed when board is powered-on. But situation is
diffrent when we have reboot due to board reset booton press.
There are configuration where signal from reset button is connected
to CF card (or disk), in some cases device reset signal is connected to
GPIO with assumption to be asserted by software.

I don't know if we can remove this. In hw reset case system/driver will
run with undefined device state, in example device can generate 
interrupts.

Stanislaw Gruszka

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu
  2009-02-11 20:03 ` Andrew Victor
@ 2009-02-12  9:33   ` Stanislaw Gruszka
  2009-02-13 13:23     ` Sergei Shtylyov
  2009-02-17 10:21     ` Stanislaw Gruszka
  0 siblings, 2 replies; 11+ messages in thread
From: Stanislaw Gruszka @ 2009-02-12  9:33 UTC (permalink / raw)
  To: Andrew Victor; +Cc: linux-ide, linux-arm-kernel

Hi

Wednesday 11 February 2009 21:03:29 Andrew Victor napisał(a):
> > +       if (data->flags & AT91_CF_TRUE_IDE) {
> > +               /* check if device is present */
> > +               if (data->det_pin && at91_get_gpio_value(data->det_pin) != 0) {
> > +                       printk(KERN_ERR "AT91 CF True IDE: no device detected\n");
> > +                       return;
> > +               }
> > +               if (data->rst_pin) {
> > +                       /* reset the card */
> > +                       at91_set_gpio_output(data->rst_pin, 0);
> > +                       /* wait as defined in ATA7 vol2 (rev 4a) figure 36 */
> > +                       udelay(25);
> > +                       at91_set_gpio_output(data->rst_pin, 1);
> > +               }
> 
> Shouldn't this rather be done in the at91_ide driver?
> I don't want to duplicate it in all the different at91sam9XX_devices.c files.

Ok, I'll move detection stuff to the driver. Not sure about reset, see my 
previous mail on this issue. Could we move the reset into driver and
risk system boot with device which possibly generate interrupts?
Or perhaps we can remove reset as whole?

> You could also define two separate "CF type" devices - one for CS4,
> another for CS5.
> That would allow for two independent "CF type" interfaces to be used
> at the same time (see at91sam9260_devices.c in maxim.org.za patches).

I saw sam9260 code before and I refused idea of doing two CF devices 
interfaces. AFAIK there are no boards we two CF slots (or separate one
IDE and one CF slot), are they? I don't think someone really need such 
board (I could be wrong). If there become a board with two interfaces, 
then new patch can be done which extend the code.
 
Cheers
Stanislaw Gruszka

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu
  2009-02-12  9:05   ` Stanislaw Gruszka
@ 2009-02-12 16:33     ` Sergei Shtylyov
  2009-02-13 10:48       ` Stanislaw Gruszka
  0 siblings, 1 reply; 11+ messages in thread
From: Sergei Shtylyov @ 2009-02-12 16:33 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-ide, Andrew Victor, linux-arm-kernel

Hello.

Stanislaw Gruszka wrote:

>>[...]

>>>+	if (data->flags & AT91_CF_TRUE_IDE) {
>>>+		/* check if device is present */
>>>+		if (data->det_pin && at91_get_gpio_value(data->det_pin) != 0) {
>>>+			printk(KERN_ERR "AT91 CF True IDE: no device detected\n");
>>>+			return;
>>>+		}
>>>+		if (data->rst_pin) {
>>>+			/* reset the card */
>>>+			at91_set_gpio_output(data->rst_pin, 0);
>>>+			/* wait as defined in ATA7 vol2 (rev 4a) figure 36 */
>>>+			udelay(25);
>>>+			at91_set_gpio_output(data->rst_pin, 1);

>>   I'm still not sure why this is needed. Do you think thta power-on 
>>reset is not enough?

> HW reset is not needed when board is powered-on. But situation is
> diffrent when we have reboot due to board reset booton press.
> There are configuration where signal from reset button is connected
> to CF card (or disk), in some cases device reset signal is connected to
> GPIO with assumption to be asserted by software.

    OK, thanks for the explanation.

> I don't know if we can remove this.

    Well, seems worth keeping.

> In hw reset case system/driver will run with undefined device state,

    What do you mean by undefined? It could have not come out of reset which 
shoiuld mean that the IDE probing code will have to wait some time before BSY 
clears -- see ide_port_wait_ready().

> in example device can generate interrupts.

    Interrupts after any kind of reset? That just shouldn't happen -- it's 
against the ATA spec at least.

> Stanislaw Gruszka

MBR, Sergei

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu
  2009-02-12 16:33     ` Sergei Shtylyov
@ 2009-02-13 10:48       ` Stanislaw Gruszka
  0 siblings, 0 replies; 11+ messages in thread
From: Stanislaw Gruszka @ 2009-02-13 10:48 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-ide, Andrew Victor, linux-arm-kernel

Hi.

Thursday 12 February 2009 17:33:08 Sergei Shtylyov napisał(a):
> >>   I'm still not sure why this is needed. Do you think thta power-on 
> >>reset is not enough?
> 
> > HW reset is not needed when board is powered-on. But situation is
> > diffrent when we have reboot due to board reset booton press.
> > There are configuration where signal from reset button is connected
> > to CF card (or disk), in some cases device reset signal is connected to
> > GPIO with assumption to be asserted by software.
> 
>     OK, thanks for the explanation.
> 
> > I don't know if we can remove this.
> 
>     Well, seems worth keeping.
> 
> > In hw reset case system/driver will run with undefined device state,
> 
>     What do you mean by undefined? It could have not come out of reset which 
> shoiuld mean that the IDE probing code will have to wait some time before BSY 
> clears -- see ide_port_wait_ready().
> 
> > in example device can generate interrupts.
> 
>     Interrupts after any kind of reset? That just shouldn't happen -- it's 
> against the ATA spec at least.
I mean undefined state and interrupts where is _no_ IDE device reset
and system boots because of board button h/w reset (or watchdog reset).

Ok, IDE layer will cope with any registers state during initialization, but
when not handled interrupt is generated we have spurious interrupt
which is some trouble for kernel.

Cheers
Stanislaw Gruszka

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu
  2009-02-12  9:33   ` Stanislaw Gruszka
@ 2009-02-13 13:23     ` Sergei Shtylyov
  2009-02-17 10:21     ` Stanislaw Gruszka
  1 sibling, 0 replies; 11+ messages in thread
From: Sergei Shtylyov @ 2009-02-13 13:23 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: Andrew Victor, linux-ide, linux-arm-kernel

Hello.

Stanislaw Gruszka wrote:

>>> +       if (data->flags & AT91_CF_TRUE_IDE) {
>>> +               /* check if device is present */
>>> +               if (data->det_pin && at91_get_gpio_value(data->det_pin) != 0) {
>>> +                       printk(KERN_ERR "AT91 CF True IDE: no device detected\n");
>>> +                       return;
>>> +               }
>>> +               if (data->rst_pin) {
>>> +                       /* reset the card */
>>> +                       at91_set_gpio_output(data->rst_pin, 0);
>>> +                       /* wait as defined in ATA7 vol2 (rev 4a) figure 36 */
>>> +                       udelay(25);
>>> +                       at91_set_gpio_output(data->rst_pin, 1);
>>> +               }
>>>       
>> Shouldn't this rather be done in the at91_ide driver?
>> I don't want to duplicate it in all the different at91sam9XX_devices.c files.
>>     
>
> Ok, I'll move detection stuff to the driver. Not sure about reset, see my 
>   

   AT91_CF_TRUE_IDE then can possibly be eliminated. There's not dire 
need for this device to have different names...

> previous mail on this issue. Could we move the reset into driver and
> risk system boot with device which possibly generate interrupts?
>   

   I don't see how keeping hardware reset in the platfrom code helps 
here -- you have that code inside #ifdef, so it's only executed when the 
driver is enabled anyway. Hm, except when the driver is built as a 
module -- in this case it should help...

MBR, Sergei



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu
  2009-02-12  9:33   ` Stanislaw Gruszka
  2009-02-13 13:23     ` Sergei Shtylyov
@ 2009-02-17 10:21     ` Stanislaw Gruszka
  1 sibling, 0 replies; 11+ messages in thread
From: Stanislaw Gruszka @ 2009-02-17 10:21 UTC (permalink / raw)
  To: Andrew Victor; +Cc: linux-ide, linux-arm-kernel

Thursday 12 February 2009 10:33:56 Stanislaw Gruszka napisał(a):
> > Shouldn't this rather be done in the at91_ide driver?
> > I don't want to duplicate it in all the different at91sam9XX_devices.c files.
> 
> Ok, I'll move detection stuff to the driver. Not sure about reset, see my 
> previous mail on this issue. Could we move the reset into driver and
> risk system boot with device which possibly generate interrupts?
> Or perhaps we can remove reset as whole?

I'll finally move resetting stuff into board specific file and detect code
into driver.

> > You could also define two separate "CF type" devices - one for CS4,
> > another for CS5.
> > That would allow for two independent "CF type" interfaces to be used
> > at the same time (see at91sam9260_devices.c in maxim.org.za patches).
> 
> I saw sam9260 code before and I refused idea of doing two CF devices 
> interfaces. AFAIK there are no boards we two CF slots (or separate one
> IDE and one CF slot), are they? I don't think someone really need such 
> board (I could be wrong). If there become a board with two interfaces, 
> then new patch can be done which extend the code.

I see no discussion here is possible :) , ok I'll revrite the code in form like 
at91sam9260_devices.c has.

Cheers
Stanislaw Gruszka

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-02-17 10:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-09 10:45 [PATCH 3/3 v3] AT91: initialize Compact Flash on AT91SAM9263 cpu Stanislaw Gruszka
2009-02-11 13:59 ` Sergei Shtylyov
2009-02-11 16:46   ` Bartlomiej Zolnierkiewicz
2009-02-11 17:31     ` Sergei Shtylyov
2009-02-12  9:05   ` Stanislaw Gruszka
2009-02-12 16:33     ` Sergei Shtylyov
2009-02-13 10:48       ` Stanislaw Gruszka
2009-02-11 20:03 ` Andrew Victor
2009-02-12  9:33   ` Stanislaw Gruszka
2009-02-13 13:23     ` Sergei Shtylyov
2009-02-17 10:21     ` Stanislaw Gruszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.