void sh_intc_register_sources(struct intc_desc *desc,

			      struct intc_vect *vectors,

			      int nr_vectors,

			      struct intc_group *groups,

			      int nr_groups)

{

    unsigned int i, k;

    struct intc_source *s;



    for (i = 0; i < nr_vectors; i++) {

	struct intc_vect *vect = vectors + i;



	sh_intc_register_source(desc, vect->enum_id, groups, nr_groups);

	s = sh_intc_source(desc, vect->enum_id);

	if (s)

	    s->vect = vect->vect;



#ifdef DEBUG_INTC_SOURCES

	printf("sh_intc: registered source %d -> 0x%04x (%d/%d)\n",

	       vect->enum_id, s->vect, s->enable_count, s->enable_max);

#endif

    }



    if (groups) {

        for (i = 0; i < nr_groups; i++) {

	    struct intc_group *gr = groups + i;



	    s = sh_intc_source(desc, gr->enum_id);

	    s->next_enum_id = gr->enum_ids[0];



	    for (k = 1; k < ARRAY_SIZE(gr->enum_ids); k++) {

                if (!gr->enum_ids[k])

                    continue;



		s = sh_intc_source(desc, gr->enum_ids[k - 1]);

		s->next_enum_id = gr->enum_ids[k];

	    }



#ifdef DEBUG_INTC_SOURCES

	    printf("sh_intc: registered group %d (%d/%d)\n",

		   gr->enum_id, s->enable_count, s->enable_max);

#endif

	}

    }

}

void sh_intc_register_sources(struct intc_desc *desc,

			      struct intc_vect *vectors,

			      int nr_vectors,

			      struct intc_group *groups,

			      int nr_groups)

{

    unsigned int i, k;

    struct intc_source *s;



    for (i = 0; i < nr_vectors; i++) {

	struct intc_vect *vect = vectors + i;



	sh_intc_register_source(desc, vect->enum_id, groups, nr_groups);

	s = sh_intc_source(desc, vect->enum_id);

	if (s)

	    s->vect = vect->vect;



#ifdef DEBUG_INTC_SOURCES

	printf("sh_intc: registered source %d -> 0x%04x (%d/%d)\n",

	       vect->enum_id, s->vect, s->enable_count, s->enable_max);

#endif

    }



    if (groups) {

        for (i = 0; i < nr_groups; i++) {

	    struct intc_group *gr = groups + i;



	    s = sh_intc_source(desc, gr->enum_id);

	    s->next_enum_id = gr->enum_ids[0];



	    for (k = 1; k < ARRAY_SIZE(gr->enum_ids); k++) {

                if (!gr->enum_ids[k])

                    continue;



		s = sh_intc_source(desc, gr->enum_ids[k - 1]);

		s->next_enum_id = gr->enum_ids[k];

	    }



#ifdef DEBUG_INTC_SOURCES

	    printf("sh_intc: registered group %d (%d/%d)\n",

		   gr->enum_id, s->enable_count, s->enable_max);

#endif

	}

    }

}

	if (s) 	    s->vect = vect->vect; 	printf("sh_intc: registered source %d -> 0x%04x (%d/%d)\n", 	       vect->enum_id, s->vect, s->enable_count, s->enable_max);
void FUNC_0(struct intc_desc *VAR_0,

			      struct intc_vect *VAR_1,

			      int VAR_2,

			      struct intc_group *VAR_3,

			      int VAR_4)

{

    unsigned int VAR_5, VAR_6;

    struct intc_source *VAR_7;



    for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++) {

	struct intc_vect *VAR_8 = VAR_1 + VAR_5;



	sh_intc_register_source(VAR_0, VAR_8->enum_id, VAR_3, VAR_4);

	VAR_7 = sh_intc_source(VAR_0, VAR_8->enum_id);

	if (VAR_7)

	    VAR_7->VAR_8 = VAR_8->VAR_8;



#ifdef DEBUG_INTC_SOURCES

	printf("sh_intc: registered source %d -> 0x%04x (%d/%d)\n",

	       VAR_8->enum_id, VAR_7->VAR_8, VAR_7->enable_count, VAR_7->enable_max);

#endif

    }



    if (VAR_3) {

        for (VAR_5 = 0; VAR_5 < VAR_4; VAR_5++) {

	    struct intc_group *VAR_9 = VAR_3 + VAR_5;



	    VAR_7 = sh_intc_source(VAR_0, VAR_9->enum_id);

	    VAR_7->next_enum_id = VAR_9->enum_ids[0];



	    for (VAR_6 = 1; VAR_6 < ARRAY_SIZE(VAR_9->enum_ids); VAR_6++) {

                if (!VAR_9->enum_ids[VAR_6])

                    continue;



		VAR_7 = sh_intc_source(VAR_0, VAR_9->enum_ids[VAR_6 - 1]);

		VAR_7->next_enum_id = VAR_9->enum_ids[VAR_6];

	    }



#ifdef DEBUG_INTC_SOURCES

	    printf("sh_intc: registered group %d (%d/%d)\n",

		   VAR_9->enum_id, VAR_7->enable_count, VAR_7->enable_max);

#endif

	}

    }

}

void FUNC_0(struct intc_desc *VAR_0,
struct intc_vect *VAR_1,
int VAR_2,
struct intc_group *VAR_3,
int VAR_4)
{ unsigned int VAR_5, VAR_6; struct intc_source *VAR_7; for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++) { struct intc_vect *VAR_8 = VAR_1 + VAR_5; sh_intc_register_source(VAR_0, VAR_8->enum_id, VAR_3, VAR_4); VAR_7 = sh_intc_source(VAR_0, VAR_8->enum_id); if (VAR_7)
VAR_7->VAR_8 = VAR_8->VAR_8; #ifdef DEBUG_INTC_SOURCES
printf("sh_intc: registered source %d -> 0x%04x (%d/%d)\n",
VAR_8->enum_id, VAR_7->VAR_8, VAR_7->enable_count, VAR_7->enable_max); #endif
} if (VAR_3) { for (VAR_5 = 0; VAR_5 < VAR_4; VAR_5++) { struct intc_group *VAR_9 = VAR_3 + VAR_5; VAR_7 = sh_intc_source(VAR_0, VAR_9->enum_id); VAR_7->next_enum_id = VAR_9->enum_ids[0]; for (VAR_6 = 1; VAR_6 < ARRAY_SIZE(VAR_9->enum_ids); VAR_6++) { if (!VAR_9->enum_ids[VAR_6])
continue; VAR_7 = sh_intc_source(VAR_0, VAR_9->enum_ids[VAR_6 - 1]); VAR_7->next_enum_id = VAR_9->enum_ids[VAR_6]; } #ifdef DEBUG_INTC_SOURCES
printf("sh_intc: registered group %d (%d/%d)\n",
VAR_9->enum_id, VAR_7->enable_count, VAR_7->enable_max); #endif
} } }