/* Disable a module clock derived from the PBB clock.  */
void sysclk_disable_pbb_module(unsigned int index)
/* Disable a module clock derived from the PBB clock.  */
void sysclk_disable_pbb_module(unsigned int index)
{
	unsigned int pbus_id = 0;
	irqflags_t   flags;
	sysclk_priv_disable_module(AVR32_PM_CLK_GRP_PBB, index);
	if (index == SYSCLK_AES)
		pbus_id = 1;
	flags = cpu_irq_save();
	sysclk_bus_refcount[pbus_id]--;
	if (!sysclk_bus_refcount[pbus_id])
		sysclk_disable_hsb_module(2 + (4 * pbus_id));
	cpu_irq_restore(flags);
}