summaryrefslogtreecommitdiffstats
path: root/qemu/roms/u-boot/board/Marvell/db64360/eth.h
blob: 4e427683b41e772cf2444e6f8d5b2e800415f2e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * (C) Copyright 2001
 * Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

/*
 * eth.h - header file for the polled mode GT ethernet driver
 */

#ifndef __EVB64360_ETH_H__
#define __EVB64360_ETH_H__

#include <asm/types.h>
#include <asm/io.h>
#include <asm/byteorder.h>
#include <common.h>


int db64360_eth0_poll(void);
int db64360_eth0_transmit(unsigned int s, volatile char *p);
void db64360_eth0_disable(void);
bool network_start(bd_t *bis);

int mv6436x_eth_initialize(bd_t *);

#endif /* __EVB64360_ETH_H__ */
tipleField from booking.lib import get_user_items, get_user_field_opts class QuickBookingForm(forms.Form): purpose = forms.CharField(max_length=1000) project = forms.CharField(max_length=400) hostname = forms.CharField(max_length=400) installer = forms.ModelChoiceField(queryset=Installer.objects.all(), required=False) scenario = forms.ModelChoiceField(queryset=Scenario.objects.all(), required=False) def __init__(self, data=None, user=None, lab_data=None, *args, **kwargs): if "default_user" in kwargs: default_user = kwargs.pop("default_user") else: default_user = "you" self.default_user = default_user super(QuickBookingForm, self).__init__(data=data, **kwargs) self.fields["image"] = forms.ModelChoiceField( Image.objects.filter(public=True) | Image.objects.filter(owner=user), required=False ) self.fields['users'] = SearchableSelectMultipleField( queryset=UserProfile.objects.select_related('user').exclude(user=user), items=get_user_items(exclude=user), required=False, **get_user_field_opts() ) self.fields['length'] = forms.IntegerField( widget=NumberInput( attrs={ "type": "range", 'min': "1", "max": "21", "value": "1" } ) ) self.fields['filter_field'] = MultipleSelectFilterField(widget=MultipleSelectFilterWidget(**lab_data)) def build_user_list(self): """ Build list of UserProfiles. returns a mapping of UserProfile ids to displayable objects expected by searchable multiple select widget """ try: users = {} d_qset = UserProfile.objects.select_related('user').all().exclude(user__username=self.default_user) for userprofile in d_qset: user = { 'id': userprofile.user.id, 'expanded_name': userprofile.full_name, 'small_name': userprofile.user.username, 'string': userprofile.email_addr } users[userprofile.user.id] = user return users except Exception: pass def build_search_widget_attrs(self, chosen_users, default_user="you"): attrs = { 'set': self.build_user_list(), 'show_from_noentry': "false", 'show_x_results': 10, 'scrollable': "false", 'selectable_limit': -1, 'name': "users", 'placeholder': "username", 'initial': chosen_users, 'edit': False } return attrs class HostReImageForm(forms.Form): image_id = forms.IntegerField() host_id = forms.IntegerField()